-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google stopped the TTS service, the PiAUISuite won't work #56
Comments
I've got exactly the same problem, and i'll be thankfull if you might update it. Best regards |
Or you can use offline espeak tts script for rest of us. I guess you had that previously. |
yes, make it offline please... (and if it is not too difficult, can you remove the old videos from youtube, and make new ones for raspbian...it took me a lot of time to figure out, I'm a little bit outdated :) ) |
@raqueebh How exactly can we use the offline espeak script? |
the tts script seems pretty basic, can't we just drop in another one and wrap it with a simplified /usr/bin/tts ? Going to give that a try |
Changes my tts script to this: #!/bin/bash string=$@ I can now use tts "this is a test" but I am pretty sure voicecommand is returning null voice recognitions.. Having a look at /usr/bin/speech-recog.sh now, but I'm wondering if we need API keys now...? |
I have also noticed that google's TTS is no longer working. I downloaded pico2wave to replace tts. I then wrote a wrapper to replace tts with this chunk of code
What I found is that if I run "tts 'say something'" it will "say something." Now, when I'm running "voicecommand -c", I noticed that it will respond based on what's in the command.conf file. So, if i say "who made you" VoiceCommand will reply back with "I was created by Steven Hickson." However, the first acknowledge response, "Yes Sir" or the i-dont-understand-you prompt, "Received improper command" is not coming out at all. I'm looking into /dev/shm/voice.log and such, and I think its something to do with VoiceCommand using "tts -l en" (where -l en for english ) vs pico2wave -l en-US, (where en-US represents US english.) Which means my script above is spitting out a -l error messsage. So far, I've found speech-recog.sh that has a reference to "tts -l en" I fixedit to "tts -l en-US" but I'm still looking for other references. |
irsx02 where did you place the wrapper? |
irsx02 So good to know someone is trying to keep voicecommand alive! Please could you provide a bit more detail on where this wrapper needs to go. Do you just replace the existing tts.sh file with this one? |
Yes! Please keep trying. I've already installed Pico2Wave. |
Ok, I'm on Raspberry Pi 3, Raspbian (jessie), so your mileage may vary. I placed my TTS script at /usr/bin directory. There should already be a TTS file there. Back it up (you may need to use sudo), copy my tts script, and then make the script executable. And you should hear its greeting. |
well seems google tts change its api somehow.. |
Update; I made my tts replacement TTS script/wrapper a little more robust - but its now stuck at en-US (US English) It does solve the issue with the "Yes Sir" and "Receieved Improper Command." At the expense of behing locked into US English. Basically, I look for the -l option in tts, and make sure the language is set to "en-US" when it sees "en."
I"m going to admit its not ideal, but it is working for me at the moment. It recognizes my keyword, respond appropriately (yes sir!) and awaits my command. When I tell it to "tell me the time" it replies correctly. |
Firstly, much appreciate the extra detail and also the extra mile with the update. I'm working with RpiB with Wheezy (I know I should be on Jessie but I'm being lazy and it has taken me days to get Voicecommand just to do STT). I've installed your replacement TTS script (all of 2 secs, nice'n'easy) but now I am struggling to find a working version of Pico2Wav - when I apt-get libttspico-utils I get package not available?? Searching and looking on other forums suggests I have to compile and build???? Or there is this pico2wave "like" option here - Thanks again for responses so far - I'm determined to get this working!!! |
So I followed the instructions for PicoPi2Wav and it failed to compile. Looks like I'm going to have to find the real pico2wav. |
OK, making some progress - found this guide here http://rpihome.blogspot.co.uk/2015/02/installing-pico-tts.html. Just waiting for it to compile - fingers crossed!! |
SUCCESS!!! Thank You! - She is talking to me again. |
@irsx02 i followed your steps, now i'm able hear back from pi when i type tts "hello i'm back" i can hear the same thing when i run the command voicecommand -c i always hear No translation can you help me on this ??
|
@Colin1964 can you paste your tts file in gist that would help me |
@krist-jin i tried the way you have mentioned, still no luck its keeping on saying No translation. When i say Pie, i get a reply as Yes,Sir but after that when i ask Who made you? or anything it says No translation can someone pls help me on this ? |
@saikrishna321 - Can you go into the PiAUISuite/VoiceCommand directory and look for a shell script called speech-recog.sh ? Run the script
If it still says "no translation", then type The no translation is happening somewhere within those lines of code. You can run each section individually to figure out where the "No Translation" is coming from. |
One more thing. You should see what is the formatting error on line 31 of your config file. Via a terminal window, from your home directory
You should see a list of all VoiceCommand acceptable commands. Jump to line 31 and look for the format error. (All instructions done on Raspberry Pi 3, Raspbian (Jessie) . Your OS, file locations and text editor may vary. ) |
@irsx02 thanks a lot for getting back on it :) i will give it a try and get back to you . |
@saikrishna321 Also, your issue is more about STT (Speech To Text) and not TTS (Text to Speech) Text to Speech is what pico2wave is trying to solve. Speech to Text is more about "No translation"." See if anything over in #55 can help you out. And remember, if you find the solution, make sure you post it to #55 to help out anyone in the future. |
When i ran ./speech-recog.sh i cant hear back anything ..
when i run voicecommand -c again, it replies Yes Sir. Fixed the error on the .command.conf after that it says No translation
speech-recog.sh https://gist.github.com/saikrishna321/833e0206741dbe5f8caff7036d58b090 can you please help me fix this .. |
The "No translation" error looks exactly like the STT(speech to text) issue mentioned in #55. Follow @krist-jin instructions from his post. From the gist link you provided, I can see the line near the end with |
Its taken me all day but i finally got voicecommand compiled and 99% working on my PI 2. It responds to my voice, finds my keyword and performs the command succesfully. If i say pi and then who made you it responds and speaks :) The only issue i have is after ive said my keyword 'pi' it doesnt respond with 'Yes Sir', ive checked my config file and its correct in there. Voicecommand does wait after my keyword and then accepts my command but i just dont get the spoken 'Yes Sir' through the speakers. Any ideas? do i need to run voicecommand with the -l en parameter? Not at my pi at the moment to test for a few days. |
@scoobyd00 Just wanted to see if you could check on a few things. First, at the command prompt, if you run
Can you hear your Pi talk? Next, if you edit .command.conf in your root directory, do you see
Or exactly what is located after the = sign? |
Thanks for your help. tts commands work fine and i can hear speech output through the speakers. I've got response set to ==Yes Sir? I just don't hear when I've spoke my keyword. Ive tried voicecommand -r Yes but i get no output with that either. |
Fixed the issue!. My own silly fault, had a slight coding error in the script you provided. Works perfectly now, thanks :) |
My problem is as follows: I have reinstalled several times, I've added picotts and it works fine. I've modified voicecommand.ccp as recommended and done the same for speech-recog.sh. I've replace tts with the the script that uses pico2wave and that works. So I'm at my wit's end - never hear any response (i.e. "Yes Sir"). Any suggestions would be appreciated. TIA |
@wildbi111 From your description, having done steps 1,2,3 correctly, i would expect step four to work. First thing I can think of, is for Step 3, did you use your response word? And did speech-recog.sh identify your response word correctly? Next, did you ever get step 4, run voicecommand -c, to recognize your resopnse word and replay at any point? One annoying thing I have found is that voicecommand really listens for ~3 seconds, and uploads your voice for ~1 second. If you speak during that 1 second, nothing happens. (This is done on a raspberry pi 3) I've found that when you see the "Received %" go from 0%-100% , VoiceCommand is not listening at that moment. Its uploading sound to Google's servers. If you can time it right, I've noticed that you have to speak after seeing 100 finish and when a new line appear. I'm hoping that is it. give it a try |
If your not getting the 'Yes Sir' reply, double check the 2nd script that @irsx02 made. This one;- #!/bin/bash I had a typing error in mine and this is what stopped my system from saying 'Yes Sir'. |
@scoobyd00 @irsx02 I can get responses to the ~ lines in the .commands.conf file but the keyword always fails. I've tried several other keywords but no joy. #This is the default config file |
@wildbi111 this one is a bit of a far fetched answer; but see if you could change your keyword from Pi to something like "Computer" or "Raspberry" The reason I can think of is that sometimes "Pi" can be intrepreted as Hi. . . which then gets ignored by VoiceCommand. |
@irsx02 - I did change the keyword and it still does not recognize the keyword but it does recognize the ~ commands so I'm still troubleshooting that. Also, is there any documentation on the various ~ commands? |
@wildbi111 The closest documention to the ~ command can be found at http://stevenhickson.blogspot.com/2013/06/voice-command-v30-for-raspberry-pi.html This is the creator's personal website, with a bit of help on how to use his program. |
Hello All, I read through the entire conversation to figure out how to get my setup working. I initially had both issues 55 & 56. After a long day, I managed to resolve Issue 55. Now I can record my voice, and execute commands based on speech recognition. Could someone succinctly explain if using Pico2Wav is common to all solutions? Or is there anyway to get Google TTS working? or perhaps another third party TTS (Festival/Espeak) that is easier to install? Which file(s) should I modify? I'm mainly interested in the verify feature, with the following use case: I'm using Raspberry Pi 3 Model B, with Raspbian Jessie. I'm planning to use this for an audio project, without a display. So getting the confirmation is important. Many thanks in advance. |
UPDATE: The branch by @lowdev did the trick for me. I'm getting some limited functionality. I have been able to get both TTS, and STT working, by just using his .cpp file to make VoiceCommand and reinstall PiAUISuite. No running into some trouble with the google and youtube commands. |
@lowdev @irsx02 Thanks to you two I have got both Pico2Wav and Google API versions of TTS working sweet as a nut and "Gladys" is all linked up to Wolfram Alpha and chatting away nicely. At the risk of sounding ungrateful though I was hoping you could help me tweak the TTS code so that it recognises a " | " {Vertical Bar} and replaces this with a null character. I presume because of the format of the response from Wolfram and google they use " | " as a separator however this means Gladys responds with "Vertical Bar" nearly every other word!!! I am trying to improve my bash skills but this is a bit beyond me at the moment. |
@Colin1964 - Its not ungrateful if its an improvment. And improvements are always welcomed. Unfortunately, I've been rather busy as of late and can't help too much. If you look here Look for example with three lines of code, and a mention of first/second You'll want to find instances of | and replace it with just a space " " good luck hunting. |
@irsx02 Much appreciated. I'll take a look - probably just the prod I need to stop being lazy and trawling forums and instead get my coding skills improved. I'll let you know how I get on! Also. thanks for confirming the lang en-us issue for @mathijsvandenhurk over on #76 |
@irsx02 Not sure if I made this more difficult than I needed to but I ended up adding a line to voicecommand.cpp to stop Gladys saying "Vertical Bar". The line I added is the "replace_all" line shown in the extract below for anyone interested. All working and can now put another notch on my C++ coding stick!
` |
I have been trying to get this thing to work and I am running into the same issues mentioned in this chain. I have attempted to implement the changes required and got the individual parts working:
Now I understood I have to make changes to the voicecommand.cpp file. However making ANY change to this file (adding space and putting it back) then compiling (and installing) breaks everything. Voicecommand returns me either nothing (when running it with sudo) or "illegal instruction" when running it without sudo. This means I cannot make the required changes to this file... NO CHECK Has anyone come accross this issue? Is my compiler broken? I find it very weird that making no changes to the file would break it after running "make". I honestly have no idea anymore what to do as I think I have tried all the things mentioned in this chain. I would appreciate if anyone could shed some light on the situation... Thanks in advance |
@tr1plus I think you're problem is that you are doing a full re-install after making changes to voicecommand.cpp. Unfortunately this will re-install the original versions of speech_recog.sh and tts and overwrite the changes you have just made!!! Go back and redo the changes to speech_recog and tts. Then update voicecommand.cpp following the instructions and run |
Okay guys... I have figured out the issue... 20 minutes after posting this.
Maybe you can also help with that (haven't look into it, will do that in the meantime too) I get no reply after I speak the code word. But it works when I see console and it is able to answer my commands Final edit: Changes made to tts (second script provided). Everything is working now. Sorry for posting here but this helped me think it seems. Solved everything. Biggest issue was the ARM6 compile :) |
@tr1plus A lot of people seem to struggle to get the keyword and response working (verify mode). Have you looked through suggestion in #76, especially if you are not running in continuous mode. Also check your mic threshold value in .commands.conf (see #63). I found that minor changes in threshold value would either result in Pi detecting audio all the time but (audio is distorted??) So not registering as keyword (threshold too low) or Pi just sits there waiting for you because it can't 'hear you' (threshold too high) |
@Colin1964 I have resolved the issue (see post above). I accidentally skipped one step for the tts changes. Thanks for looking into it tho :) |
Hi everyone i have no audio from my raspberry pizero... aplay and arecord works fine but no audio when i use voicecommand... can anyone help me? |
Hi guys, |
I replaced the TTS script and still get nothing, any idea what I might have skipped? |
Hello Steve,
It took 3 days to figure out tts script is not working.
Seems like google has blocked that service when its used by automated scripts.
https://support.google.com/websearch/answer/86640
Can you please update like Jasper?
Thanks.
Raqueeb Hassan
Bangladesh
The text was updated successfully, but these errors were encountered: