title: Open Source Software For Transcribing Speech in Audio Files
body: <p>Can anyone recommend reliable open source software for transcribing English speech in wav files? The two main programs I've researched are <a href="http://cmusphinx.sourceforge.net/" rel="noreferrer">Sphinx</a> and <a href="http://julius.sourceforge.jp/en_index.php" rel="noreferrer">Julius</a>, but I've never been able to get either to work, and the documentation with each on transcribing files is sketchy at best.</p>
  
  <p>I'm developing on 64-bit Ubuntu 10.04, whose repos include sphinx2 and julius, as well as voxforge's julius acoustic modal for English. I'm focussing on transcribing files, instead of directly processing sound from a mic, because I've given up on expecting projects like these to work with Ubuntu's sound system. This isn't a knock against Ubuntu, as I can record sound with my mic perfectly using Audacity, but neither system seems able to access my mic, so I'm hoping I can simply their configuration by just reading from a file.</p>
  
  <p>I first tried Sphinx2, from the Ubuntu package sphinx2-bin. Even though the sample sphinx2-demo seemed to work on transcribing a file, there's virtually no documentation on the configuration, so I'm not sure how I'd customize this to read from an arbitrary wav. The audio file used in the demo is in some undocumented "16k" format, which is indirectly referenced through 2 configuration files. There's a brief blurb describing sphinx2-demo as running sphinx2-batch, but inspecting the script shows it's actually calling sphinx2-continuous. Even worse, the --help docs for each script list about 6 dozen options, and doesn't mention which are required or optional. Overall, the lack of sphinx documentation, and the poor quality of existing documentation is driving me nuts.</p>
  
  <p>I next tried Julius, again from the Ubuntu package, which was surprisingly recent (4.1), considering the version used in Voxforge's quickstart is 3.5. The package seems to include slightly better documentation, and even an example written in Python (/usr/share/doc/julius-voxforge/examples/controlapp). After reading the example's docs, I tried adapting it to read from a file by creating a file <code>filelist.txt</code> containing the text "hello.wav" referring to a file of the same name, containing a recording of someone saying "hello". Placing these in the same directory, I ran:</p>
  
  <pre><code>julius -input file -filelist filelist.txt -C julian.jconf
  </code></pre>
  
  <p>getting the response:</p>
  
  <pre><code>### read waveform input
  Error: adin_file: sampling rate != 16000 (8000)
  Error: adin_file: error in parsing wav header at hello.wav
  Error: adin_file: failed to read speech data: "hello.wav"
  0 files processed
  </code></pre>
  
  <p>Retrying by specifying absolute filenames for filelist.txt and hello.wav produce the same error.</p>
  
  <p>I also tried the Julius call used in the example, to record directly from a mic:</p>
  
  <pre><code>julius -input mic -C julian.jconf
  </code></pre>
  
  <p>I called this several times, and the response varied between the error:</p>
  
  <pre><code>Cannot read /dev/dsp
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>STAT: AD-in thread created
  &lt;&lt;&lt; please speak &gt;&gt;&gt;
  </code></pre>
  
  <p>In the later case, no matter what I say into the mic, nothing happens. I can't tell if it's still unable to read the mic, or if it's reading something, but is simply unable to transcribe the audio.</p>
  
  <p>I'm not sure what to make of this. The errors I'm getting don't leave me with much to go on. Why can't it read a wav? Why can't it read /dev/dsp? Why does it then appear to be able to read /dev/dsp, but not react in any way?</p>
  
  <p>Has anyone else had <em>any</em> success with open source speech recognizers, especially on Linux?</p>