Search code examples
cmusphinxpocketsphinx

Streaming a file off a server


I am trying to stream the recorded audio from my raspberry pis to my desktop computer which handles pocketsphinx phenomenally. I can pipe the audio using

arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 sox - test.wav

And then run it using pocketsphinx_continuous -dict ~/4568.dic -lm ~/4568.lm -infile ~/test.wav

But once it reaches the end of the file, it stops, even though the file is still writing. Is there a way to keep it open?


Solution

  • To anyone else finding this,

    arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 pocketsphinx_continuous -infile /dev/stdin

    is how to do it