"open source software for transcribing speech in audio files" Code Answer


why can't it read a wav?

it tells you that the file has wrong sampling rate (8000) instead of requested (16000). sampling rate is very important for speech recognition software.

why can't it read /dev/dsp?

in recent versions of ubuntu pulseaudio framework is used instead of oss. the version you are trying is using oss so you need to install oss-compatibility package from your distribution to bring oss support back.

you can try newer julius which has pulseaudio support

why does it then appear to be able to read /dev/dsp, but not react in any way?

audio input doesn't work properly.

has anyone else had any success with open source speech recognizers, especially on linux?

sure, check this video as an example of what people do with cmusphinx:


i suggest you to revisit cmusphinx package which is a leading open source speech recognition engine. there are loads of documents on the website, you just need to read them. remember that speech recognition is a complex area where you can get a great results but you also need to invest your time in understanding the technology. just like with any other domain.

in short, to transcribe a file with cmusphinx you need to do the following 3 simple steps:

  1. take wav file and resample it to 8khz 16 bit mono file with sox:
    sox input.wav -r 8000 -c 1 resampled.wav
  1. install pocketsphinx 0.7
   apt-get install pocketsphinx
  1. decode the file
    pocketsphinx_continuous -samprate 8000 -infile resampled.wav

the result will be printed to standard output. to supress the logger, add stderr redirection to /dev/null

    pocketsphinx_continuous -infile resampled.wav 2> /dev/null
By Rajkumar Yadav on February 9 2022

Answers related to “open source software for transcribing speech in audio files”

Only authorized users can answer the Search term. Please sign in first, or register a free account.