i am working on speech recognition . for this i am using "alsa-utils" but when i try to use this script
#!/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
i am getting this error
“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…”
please help :(
From the pastebin I see card 0
then device 0
or device 1
, so try lining up the arecord
command with card,device
in that order like one of these,
arecord -D plughw:0,0 -q -f cd -t wav | ...
arecord -D plughw:0,1 -q -f cd -t wav | ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With