从服务器流式传输文件
Streaming a file off a server
我正在尝试将录制的音频从我的 raspberry pis 流式传输到我的台式电脑,它处理 pocketsphinx 非常出色。我可以使用
传输音频
arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 sox - test.wav
然后 运行 它使用
pocketsphinx_continuous -dict ~/4568.dic -lm ~/4568.lm -infile ~/test.wav
但是一旦到达文件末尾,它就会停止,即使文件仍在写入。有没有办法让它保持打开状态?
使用 named pipe instead of a regular file. Also you can file an issue at github.com/cmusphinx/pocketsphinx 请求 pocketsphinx_continious
应该能够读取 stdin
。当然,欢迎您提交此类补丁。
对于发现此问题的任何其他人,
arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 pocketsphinx_continuous -infile /dev/stdin
是怎么做的
我正在尝试将录制的音频从我的 raspberry pis 流式传输到我的台式电脑,它处理 pocketsphinx 非常出色。我可以使用
传输音频arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 sox - test.wav
然后 运行 它使用
pocketsphinx_continuous -dict ~/4568.dic -lm ~/4568.lm -infile ~/test.wav
但是一旦到达文件末尾,它就会停止,即使文件仍在写入。有没有办法让它保持打开状态?
使用 named pipe instead of a regular file. Also you can file an issue at github.com/cmusphinx/pocketsphinx 请求 pocketsphinx_continious
应该能够读取 stdin
。当然,欢迎您提交此类补丁。
对于发现此问题的任何其他人,
arecord -D plughw:1,0 -r 16000 -f S16_LE | ssh -C user@192.168.86.101 pocketsphinx_continuous -infile /dev/stdin
是怎么做的