syl22-00 / pocketsphinx.js

Speech recognition in JavaScript and WebAssembly
1.49k stars 261 forks source link

Get "raw" text #90

Open fred2nice opened 7 years ago

fred2nice commented 7 years ago

Hi, I am working on a pronunciation trainer. I would to write "raw" text without correction.

I want the student to see the word spoken and not the word that corresponds the most. Is it possible to directly write the audio to text ?

An example : If the student says "beers" I would like to print "beers" is not "bears" as result.

Thread7 commented 7 years ago

If I understand you correctly it seems like you have two options. Neither really relies on any features that are built into pocketsphinx.

  1. You could have a huge database of words that closely correspond with other words. Eg. beers -> bears spear -> spare peer -> pear Whenever a word is recognized by the engine it queries the database to get the corresponding word.
  2. You could have some algorithm find the corresponding word whenever one is recognized by the engine. In either case it isn't really a feature built into pocketsphinx.
syl22-00 commented 7 years ago

@fred2nice The way speech recognition works is to use in parallel an acoustic model (describing the sounds of phonemes) and a language model (describing which words can be recognized, and in which order).

You can not have viable results without a language model, the language model is not here to just "correct" the text.

If you want to use speech technology for pronunciation assessment, there are plenty of academic resources about it, I would suggest you to take a look. I can also recommend you to look at Ispikit (https://ispikit.com) which I built.