tag:blogger.com,1999:blog-5599902997355913399.post2951020053123171252..comments2023-10-19T12:32:01.472+01:00Comments on Random consultant: Building an Amazon Echo Like Device with a Raspberry Pi and Google Cloud Speech ApiSMhttp://www.blogger.com/profile/12739561458581174311noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-5599902997355913399.post-88724316436345049292017-11-13T05:34:32.993+00:002017-11-13T05:34:32.993+00:00by default this is a female voice so is there any ...by default this is a female voice so is there any chance to convert into male voice?disheethttps://www.blogger.com/profile/05280009450121860851noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-14547391574034528842017-11-02T06:30:41.251+00:002017-11-02T06:30:41.251+00:00I am getting this error while installing pycurl.
...I am getting this error while installing pycurl.<br /><br /><br /><br />Using curl-config (libcurl 7.38.0)<br />running install<br />running build<br />running build_py<br />running build_ext<br />building 'pycurl' extension<br />arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/pycurl.c -o build/temp.linux-armv7l-2.7/src/pycurl.o<br />src/pycurl.c: In function ‘PYCURL_OPT’:<br />src/pycurl.c:62:20: warning: typedef ‘compile_time_assert_fail__’ locally defined but not used [-Wunused-local-typedefs]<br /> { typedef int compile_time_assert_fail__[1 - 2 * !(expr)]; }<br /> ^<br />src/pycurl.c:69:5: note: in expansion of macro ‘COMPILE_TIME_ASSERT’<br /> COMPILE_TIME_ASSERT(OPTIONS_SIZE == CURLOPT_HTTP200ALIASES - CURLOPTTYPE_OBJECTPOINT + 1);<br /> ^<br />src/pycurl.c: In function ‘do_curl_setopt’:<br />src/pycurl.c:1076:25: error: ‘CURLOPT_PASSWDDATA’ undeclared (first use in this function)<br /> option == CURLOPT_PASSWDDATA))<br /> ^<br />src/pycurl.c:1076:25: note: each undeclared identifier is reported only once for each function it appears in<br />src/pycurl.c:1172:17: warning: implicit declaration of function ‘curl_formparse’ [-Wimplicit-function-declaration]<br /> res = curl_formparse(str, &self->httppost, &last);<br /> ^<br />src/pycurl.c:1239:15: error: unknown type name ‘curl_passwd_callback’<br /> const curl_passwd_callback pwd_cb = password_callback;<br /> ^<br />src/pycurl.c:1239:45: warning: initialization makes integer from pointer without a cast<br /> const curl_passwd_callback pwd_cb = password_callback;<br /> ^<br />src/pycurl.c:1277:14: error: ‘CURLOPT_PASSWDFUNCTION’ undeclared (first use in this function)<br /> case CURLOPT_PASSWDFUNCTION:<br /> ^<br />src/pycurl.c: In function ‘initpycurl’:<br />src/pycurl.c:2404:35: error: ‘CURLOPT_PASSWDFUNCTION’ undeclared (first use in this function)<br /> insint_c(d, "PASSWDFUNCTION", CURLOPT_PASSWDFUNCTION);<br /> ^<br />src/pycurl.c:2405:31: error: ‘CURLOPT_PASSWDDATA’ undeclared (first use in this function)<br /> insint_c(d, "PASSWDDATA", CURLOPT_PASSWDDATA);<br /> ^<br />error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1disheethttps://www.blogger.com/profile/05280009450121860851noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-60067406264901037912017-04-19T10:21:19.770+01:002017-04-19T10:21:19.770+01:00Hey nice post dude, It would be awesome if you cre...Hey nice post dude, It would be awesome if you create a module for new google cloud speech API in jasper project. It would help a lot of us.<br />https://github.com/jasperproject/jasper-client<br />rafihttps://www.blogger.com/profile/09056609725274172673noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-60990112424031182132017-04-19T10:20:39.859+01:002017-04-19T10:20:39.859+01:00This comment has been removed by the author.rafihttps://www.blogger.com/profile/09056609725274172673noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-21492556922755760862017-02-15T08:20:21.108+00:002017-02-15T08:20:21.108+00:00I'm using now Google Speech Recognition instea...I'm using now Google Speech Recognition instead of Cloud Speech API. It's much faster than Google Cloud Services. Check out https://github.com/Uberi/speech_recognition and r.recognize_google(audio) methodZannoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-19483895686288606732017-02-13T23:54:52.151+00:002017-02-13T23:54:52.151+00:00Hi, you can try out these:
1) wit.ai : https://wi...Hi, you can try out these:<br /><br />1) wit.ai : https://wit.ai/docs/http/20160330#get-intent-via-speech-link<br /><br />2)Jasper : https://jasperproject.github.io/<br /><br />3)Microsoft Bing Speech API: https://www.microsoft.com/cognitive-services/en-us/speech-api<br /><br />I've only tried out wit.ai and it's good but didn't find speech recognition as good as Googles. I want to try out the Micrsoft Bing api as the latency (~5secs) is annoying with Google SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-64477531384205086802017-02-13T23:43:09.453+00:002017-02-13T23:43:09.453+00:00is there anything else than google cloud platform ...is there anything else than google cloud platform speach api i can use? because i cant create acountAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-92046436292225111072017-02-13T09:23:23.994+00:002017-02-13T09:23:23.994+00:00What kind of latency do you see with google cloud ...What kind of latency do you see with google cloud speech? For me it's consistently been ~5 seconds.SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-35701871954716217342017-02-12T22:14:10.421+00:002017-02-12T22:14:10.421+00:00After few days i can say that you are 100% true :)...After few days i can say that you are 100% true :) Switched back to google APIZannoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-144573642721570692017-02-08T23:36:23.377+00:002017-02-08T23:36:23.377+00:00Great news. Let us know what you use it forGreat news. Let us know what you use it forSMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-76572894119014686762017-02-08T23:35:45.852+00:002017-02-08T23:35:45.852+00:00That's great. I had a play with wi.ai. It'...That's great. I had a play with wi.ai. It's very powerful to interpret text. But found it's speech recognition wasn't as good as googles.SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-27975155434721789282017-02-08T21:41:11.488+00:002017-02-08T21:41:11.488+00:00Turned out I hadn't actually enabled the api k...Turned out I hadn't actually enabled the api key. It works perfectly. Thanks for all your help!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-30043670469025091872017-02-07T19:28:51.335+00:002017-02-07T19:28:51.335+00:00Hi! Great tutorial. I've set up everything wit...Hi! Great tutorial. I've set up everything without any problems and also changed google cloud speech to wit.ai - working like a charm :)Zannoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-71661733802520229182017-02-06T20:50:19.308+00:002017-02-06T20:50:19.308+00:00Yes , api key for sure. See this screenshot:
https...Yes , api key for sure. See this screenshot:<br />https://dl.dropboxusercontent.com/u/427946/Rpi%20Speech/googlecloudapikey.JPG<br /><br />SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-17973636339993674412017-02-06T20:26:59.230+00:002017-02-06T20:26:59.230+00:00Is it definitely an API key you're using, not ...Is it definitely an API key you're using, not a service account key?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-35919107110626304802017-02-06T17:49:00.387+00:002017-02-06T17:49:00.387+00:00Ye I'm sure I'm fully setup and everything...Ye I'm sure I'm fully setup and everything. I'll regenerate the API key and have another go later.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-66945236212924803852017-02-06T17:17:47.264+00:002017-02-06T17:17:47.264+00:00In the Google Cloud Platform console, get into the...In the Google Cloud Platform console, get into the API Manager and select "Credentials". Click on create credentials and select "API Key". <br /><br />Did you sign up fully to the goolge cloud platform. You need to provide payment details even though it's an beta limited time free trial. SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-424211303469970312017-02-06T17:08:57.297+00:002017-02-06T17:08:57.297+00:00You were right, I just needed to install flac. The...You were right, I just needed to install flac. The only problem now is that it won't accept my API key for google cloud speech. Every time it tries to send the file to google it says "API key not valid. Please pass a valid API key." <br />Any idea what's going wrong there? Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-72258619587057649722017-02-06T16:07:06.903+00:002017-02-06T16:07:06.903+00:00Add a line before 33 with this:
print 'arecord...Add a line before 33 with this:<br />print 'arecord -D plughw:1,0 -f cd -c 1 -t wav -d ' + str(duration) + ' -q -r 16000 | flac - -s -f --best --sample-rate 16000 -o ' + filename)<br /><br />this will print out the actual command being sent to arecord. Then yon can try running that on the command line separately. <br /><br />My suspicion is that flac isn't installed (which might be missing from my instructions)<br /><br />you will need to run :<br />sudo apt-get install flacSMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-84131879071241354822017-02-06T15:51:01.299+00:002017-02-06T15:51:01.299+00:00I tested arecord on its own and it definitely work...I tested arecord on its own and it definitely works. I can't see "test.flac" stored in the folder so that line definitely isn't running properly. Are there meant to be apostrophes in line 34?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-49627846311383228822017-02-06T01:10:29.899+00:002017-02-06T01:10:29.899+00:00Looks like the arecord command isn't creating ...Looks like the arecord command isn't creating the sound file as expected "test.flac".<br /><br />Can you see a file called "test.flac" exists in the same folder as where speechAnalyser.py is stored? <br /><br />Try running arecord from the command line to test if it is working.SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-69826391947475500362017-02-05T19:22:39.523+00:002017-02-05T19:22:39.523+00:00Ok, so I tested Sox by converting a .wav file to a...Ok, so I tested Sox by converting a .wav file to a .au file, so it seems it's been installed properly. I uncommented the print statements but I'm not sure what you mean by the test.flac being "saved down". I now get this error:<br /><br />listening ..<br />sh: 1: flac: not found<br />arecord: begin_wave:2516: write error<br />Popen outputsox FAIL formats: can't open input file `test.flac': No such file or directory<br /><br />Max Amp Start: 23<br />Max Amop Endp: 30<br />Max Amp: open i<br />Traceback (most recent call last):<br /> File "speechAnalyser.py", line 199, in <br /> spokenText = transcribe(2) ;<br /> File "speechAnalyser.py", line 57, in transcribe<br /> maxAmpValue = float(maxAmpValueText)<br />ValueError: could not convert string to float: open iAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-57267507353751575152017-02-05T13:09:18.372+00:002017-02-05T13:09:18.372+00:00Uncomment some of the print statements to use to d...Uncomment some of the print statements to use to debug (remove the '#' symbols).<br /><br />Also did sox install properly? Check by running on the command line. Sox is used to check if the file is silent by looking at the maximum amplitude.<br /><br />Also is the test.flac file saved down? SMhttps://www.blogger.com/profile/12739561458581174311noreply@blogger.comtag:blogger.com,1999:blog-5599902997355913399.post-7117456899523131542017-02-04T16:23:34.856+00:002017-02-04T16:23:34.856+00:00Hey, this is really cool. I installed everything b...Hey, this is really cool. I installed everything but when I try to run it I get these errors output:<br /><br />sh: 1: flac: not found<br />arecord: begin_wave:2516: write error<br />Traceback (most recent call last):<br /> File "speechAnalyser.py", line 199, in <br /> spokenText = transcribe(2) ;<br /> File "speechAnalyser.py", line 57, in transcribe<br /> maxAmpValue = float(maxAmpValueText)<br />ValueError: could not convert string to float: open i<br /><br />Have you experienced this error? It seems like something really simple to fix but I'm pretty new with this.Anonymousnoreply@blogger.com