我正在進行語音識別。爲此我使用「ALSA-utils的」,但是,當我嘗試使用這個腳本ALSA lib pcm_hw.c:1667:(_ snd_pcm_hw_open)card arecord的值無效:main:722:音頻打開錯誤:沒有這樣的文件或目錄
#!/bin/bash
echo 「Recording… Press Ctrl+C to Stop.」
arecord -D plughw:1,0 -q -f cd -t wav | ffmpeg -loglevel panic -y -i – -ar 16000 -acodec flac file.flac > /dev/null 2>&1
echo 「Processing…」
wget -q -U 「Mozilla/5.0」 –post-file file.flac –header 「Content-Type: audio/x-flac; rate=16000」 -O – 「http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium」 | cut -d」 -f12 >stt.txt
echo -n 「You Said: 」
cat stt.txt
rm file.flac > /dev/null 2>&1
我收到此錯誤
「Recording… Press Ctrl+C to Stop.」
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
arecord: main:722: audio open error: No such file or directory
「Processing…」
請幫助:(
你可以發佈'arecord -l'的輸出嗎? – jamieguinan
你好@jamieguinan感謝這裏給出的答覆是-1的arecord輸出 http://pastebin.com/1eyzKV4y –
回覆拜託,我在等待:( –