pocketsphinx-stt

3.0.0-alpha.2 • Public • Published

pocketsphinx-stt

Speech to text module initially Video grep Mac OSX Electron app, by Sam Lavine @sam_lavigne

Then refactored as part of autoEdit, and subsequently as part of Digital Paper Edit app.

Pocketshphinx is set with American english dictionary.

Setup

git clone https://github.com/OpenNewsLabs/pocketsphinx-stt
cd pocketsphinx-stt
npm install

Usage

on npm pocketsphinx-stt

npm install pocketsphinx-stt

There are two options, one expect the file to be already an audio file that can work with pocketsphixn

const transcribe = require('pocketsphinx-stt');
const videoFilePath = // some video file
 
transcribe(videoFilePath).then((transcript)=>{
  // Do something with the transcript
})

Check out and try the example usage node src/example-usage.js for more

Example output

Uses json format for transcript from Digital Paper Edit project.

{ words:
   [ { text: 'why', start: 0.28, end: 1.23, accuracy: 0.018412, id: 0 },
     { text: 'not', start: 1.32, end: 1.85, accuracy: 0.851958, id: 1 },
     { text: 'she\'s', start: 2.4, end: 2.7, accuracy: 0.067643, id: 2 },
    ...
    ],
  paragraphs:
   [ { id: 0, start: 0.28, end: 3.93, speaker: 'U_UKN' },
     { id: 1, start: 4.69, end: 5.81, speaker: 'U_UKN' },
     { id: 2, start: 6.55, end: 7.37, speaker: 'U_UKN' },
  ...
   ]
}
 

System Architecture

TBC

Development env

Build

npm run build

packages via babel, in dist folder

Tests

NA

Deployment

On npm

npm run publish:public

Runs build and then publishes dist folder to npm with copy of README and package.json

Readme

Keywords

none

Package Sidebar

Install

npm i pocketsphinx-stt

Weekly Downloads

7

Version

3.0.0-alpha.2

License

MIT

Unpacked Size

45.4 MB

Total Files

142

Last publish

Collaborators

  • pietrop