Hola,<br><br>I'm trying to run a BASH script which turns sends a message to Google's Transcription API. It's a modified version of the example posted on the wiki. Here we go:<br><br><br clear="all">!. #!/bin/sh<br>
2. sox $1 message.flac pad .1 0 rate 16k<br>3. wget -q -U "Mozilla/5.0" --post-file message.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "<a href="http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium">http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium</a>" > message.ret<br>
4. echo "$(cat message.ret | sed 's/.*utterance":"//' | sed 's/","confidence.*//')"<br>5. rm message.flac<br>6. rm message.ret<br>7. # rm $1<br><br>Before I stick that in a dialplan, I've been trying to run it within fs_cli to make sure it works. However, I get:<br>
<br>-ERR no reply<br><br>...every time I run it. Is there some fundamental flaw that FreeSWITCH doesn't recognize as an output? I plan on putting together a few BASH scripts and a dialplan to basically do the same thing that Mundy has done with "Siriously". <br>
<br>-BDF<br>-- <br><br>This message contains confidential information and is intended for those listed in the "To:", "CC:", and/or "BCC:" fields of the message header.If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.<br>
<br>