To follow up on this, you have also made the needed changes with your account on the IBM Cloud side right? They changed how the Free Tiers work a few months back, they are no longer “Life Long” with a monthly limit, they are 30 days and then you need to move to a paid tier (still pay-as-you-use).
Thanks Dicko, I’ll have to give that a try. I know it’s not my api credentials, as I am able to get that to work using a script that was included called bluemix-test and running it does give me a transcribed output.
... “$URL/v1/recognize?model=en-US_NarrowbandModel” >audio.txt
TRANSCRIPT=`grep transcript audio.txt | sed 's#^.*"transcript": "##g' | sed 's# "$##g'
this gets rid of the extransous ‘cat’ and the ‘1>’ output redirection.
FInally, the “TRANSCRIPT=…” line removes the “transcript:” at the front of the text and the quotation mark at the end. For purposes of testing, you could easily just “cat audio.txt” instead of the code at the end of the code. For that matter, you could just remove everything from the “1>” to the end of the script and use the output of the curl command as the output of the script.
I’ve had to alter this one a bit, as well, as it also conforms to the user/password model that bluemix had.
# Send WAV to Watson Speech to Text API. Must use "Narrowband" (aka 8k) model since WAV is 8k sample
# curl -s $CURL_OPTS -k -u $API_USERNAME:$API_PASSWORD -X POST \
curl -s $CURL_OPTS -k -u “apikey:$API_KEY” -X POST
--limit-rate 40000 \
--header "Content-Type: audio/wav" \
--data-binary @stream.part3.wav \
Still no joy, like before I’m not receiving an email with this script, and running it while running tail -f /var/log/maillog, I again do not have any output.
I’ve gotten this to work. Apart from making sure that the prerequisites were installed, there was definitely one tweak required, but in the end it was Ward’s script that did the trick.
As noted in my original post, Ward had created a script that addressed the changes made by IBM, kudos to him for this, without his work I would be completely stuck in the mud that post is here: http://nerdvittles.com/?p=25136):
I think one issue I had was the level that the bluemix credentials requipred; the test script that you can bash that ward provided was also very helpful to mak sure that this was working correctly.
Configure bluemix Credentials: Make sure that the credentials are using AT LEAST writer permissions
Edit /usr/sbin/sendmailibm so that it uses sendmail instead of sendmail.orig
# send the mail thru sendmail
#cat stream.new | sendmail.orig -t
cat stream.new | sendmail -t