I am trying to run PocketSphinx from Ruby. What I did is run a terminal command from Ruby. Like this:
cmd = "pocketsphinx_continuous \
-lm /usr/local/share/pocketsphinx/model/lm/en_US/hub4.5000.DMP \
-dict /usr/local/share/pocketsphinx/model/lm/en_US/cmu07a.dic\
-infile ~/Path/FileName.wav"
output = `#{cmd}`
puts output
This works well if there is a file input. However, when I tried to process streaming audio, like speaking from microphone, I just delete the line of "-infile". In this case it does not work anymore. PocketSphinx processes, but it never shows "Ready" like usually.
FYI, I am using Ubuntu 14.04 and Ruby 2.0.
Do you have any ideas about what's going on?