0
需要打開telnet,發送一些命令,然後從pocketsphinx發送stdout。如何將程序中的stdout不斷重定向到使用expect的衍生進程?
目前預計將等到程序結束,然後將所有內容輸出到telnet進程。 我需要pocketsphix來連續提供催生的telnet進程。
這是我到目前爲止有:
#!/usr/bin/expect -d
set send_human {.1 .3 1 .05 2}
spawn telnet 192.168.1.104 23
expect 「*」
send "\x01"; send "2\r"
expect 「:」
send -h "hello world\r"
send -h "goodbye world\r"
send -h "Test Test Test\r"
send -- [exec pocketsphinx_continuous -infile speech.wav 2> /dev/null ]\n
這工作。謝謝。 – corebinary