I am a newbie to Pi and am trying to get a speech to text project off the ground and could use some help troubleshooting.
The problem I'm having seems to be a unique error. At this point, for my project, I only want to be able to get to the point of transcribing my speech to text. For the next phase of the project I will run a script that counts the words of a conversation for meetings that we have. (Should be a pretty cool way of quantifying our meetings and doing some interesting comparisons based on who is in the room for different meetings.) For now, though, the problem is this: when I run the script below, I do not get an error. It only says "Processing..." Then, without pressing Control C to stop recording, it immediately jumps to "You said: pi@drcaptain ~$"
Code: Select all
#1/bin/bash
echo "Recording..."
arecord -D "plughw:0,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 "Mozilla5.0" --post-file file.flac --header "Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/vs/recognize?lang=en-us&client=chromium&key=<MY KEY> | cut -d\" -f12 >stt.txt
echo -n "You said: "
cat stt.txt
rm file.flac > /dev/null 2>$1Thanks in advance!!