Skip to content

pietrop/assemblyai-to-dpe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assemblyai-to-dpe

Node module to convert from assemblyAI STT json to DPE json format. It can convert AssemblyAI results, with or without speaker utterances. If speaker utterances are not present, it uses punctuation to create the paragraphs.

on npm as @pietrop/assemblyai-to-dpe

Setup

git clone git@github.com:pietrop/assemblyai-to-dpe.git
cd assemblyai-to-dpe
npm install

Usage

npm install @pietrop/assemblyai-to-dpe
const convert = require('@pietrop/assemblyai-to-dpe');
const sampleJson = require('./sample/assemblyai-speakers-sample.json');

const result = convert(sampleJson);

console.log(result);
Example of output in DPE format
{
 "words": [
   {
     "id": 0,
     "text": "Good",
     "start": 0,
     "end": 0.44
   },
   {
     "id": 1,
     "text": "day,",
     "start": 0.4,
     "end": 0.54
   },
   ...
 ],
 "paragraphs": [
   {
     "end": 101.18,
     "start": 0,
     "speaker": "SPEAKER_A"
   },
   ...
 ]
}

Development env

Node version is set in node version manager .nvmrc

Build

NA

Tests

NA

Deployment

npm run publish:public

About

convert from assemblyAi STT json to DPE json format

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published