more G-Labs products

Author Topic: Speech stopped working  (Read 4310 times)

August 03, 2015, 05:11:26 AM
Read 4310 times

BruceS

  • *
  • Information
  • Newbie
  • Posts: 13
I am running Raspberry Pi and have some speech scripts with "Program.Say" commands that have been working for awhile and all of sudden it doesn't speak any longer.  I know the script is working because my "Program.Notify" commands show the text that should be speaking.  From the desktop command prompt I can issue a speaker-test command and get sound through my speakers.

Any suggestion on how to trouble shoot Raspberry Pi speech with HomeGenie?

August 03, 2015, 05:28:59 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Try recompiling the script.  Sometimes it looks like things are running correctly but an update will break the compiled code for some reason.  Recompiling fixes things when this happens.

August 04, 2015, 04:24:35 AM
Reply #2

BruceS

  • *
  • Information
  • Newbie
  • Posts: 13
Yes I recompiled my cscript many times and even created a new wizard script to speak but no sound comes out.

August 04, 2015, 05:08:57 PM
Reply #3

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
The same is happening to me, HG is not talking any more. Speech stopped working sometime during the last week.

I've recompiled my speak script, created a new script and nothing is talking.

Running HG on a RPi 2.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

August 04, 2015, 05:21:03 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Back up your configuration, install the last version of HG, and restore your setup.  Does this version work?  Or, if you want to avoid potentially breaking your config, look at the change log (or use there change tracking feature) on GitHub to see what Gene's been working on.

August 05, 2015, 05:40:08 AM
Reply #5

BruceS

  • *
  • Information
  • Newbie
  • Posts: 13
Glad to hear I'm not the only one experiencing the issue.  Here is something I just tried...

-Made an image backup of my Raspberry 2 SD memory card.
-Installed HG r491 overtop of existing HG r493 (sudo gdebi homegenie-beta_100.r491_all.deb)
-Rebooted
-Confirmed my HG version now shows r491
-Recompiled my script

Still no speech.

-Next I let HG update itself back to r493

Still no speech

Maybe I'll try to completely uninstalling HG first and then reinstall.

August 05, 2015, 04:49:11 PM
Reply #6

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I don't think you need to uninstall HG, but that might be cleaner.  I've simply moved the HG installation dir and then reinstalled in the past and that seems to work fine.

cd /usr/local/bin
mv HomeGenie HomeGenie-bak
gdebi ...

August 05, 2015, 11:01:16 PM
Reply #7

BrendanL

  • *
  • Information
  • Newbie
  • Posts: 2
Google have altered their TTS service and now display a captcha before working. More information here: https://groups.google.com/forum/?hl=de#!category-topic/openhab/Sb8CuHDDCBk

The suggestion to add the client parameter e.g. client=openHAB, works (I'm evaluating both platforms for my needs and discovered this last night). Not sure for how long this will work though & what HG needs to support this - config or code??
 

August 11, 2015, 04:37:44 AM
Reply #8

BruceS

  • *
  • Information
  • Newbie
  • Posts: 13
I confirmed on my Raspberry Pi desktop by entering a google speech command that I get a Captcha prompt.

Code: [Select]
http://translate.google.com/translate_tts?tl=en&q=%54%68%69%73%20%69%73%20%61%20%74%65%73%74%2e%0a
But if I add the openHAB client at the end of the command that it works without getting a Captcha prompt.

Code: [Select]
http://translate.google.com/translate_tts?tl=en&q=%54%68%69%73%20%69%73%20%61%20%74%65%73%74%2e%0a&client=openHAB
How soon can someone develop a HG fix?  Should this be moved to the Bug Reporting category? I miss my house talking to me but I'm not savvy enough to fix it. :-)

In the meantime I installed Pico TTS because I thought HG would detect and use it but it didn't.

August 11, 2015, 04:35:41 PM
Reply #9

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Add an issue on github so Gene can keep track of it.

August 11, 2015, 08:42:08 PM
Reply #10

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
For those running Raspbian and any other debian derivative, you can install Pico-TTS.

Code: [Select]
sudo apt-get install libttspico-utils

HomeGenie will automatically find it and use it instead of the Google online text2speech engine.
The good thing about using Pico is that it works offline as well.


August 15, 2015, 06:04:59 AM
Reply #11

amji71

  • *
  • Information
  • Newbie
  • Posts: 10
HI Gene!
I tried but it still does not work! Is there another solution?
Thanks!

August 15, 2015, 07:49:21 PM
Reply #12

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Gene may have some additional libraries installed on his RPi which we don't have.

If you follow the instructions in the attached link it will work, at least it did do the trick for me. It involves just a tiny little bit more than installing the library Gene suggested.

http://rpihome.blogspot.com/2015/02/installing-pico-tts.html

But I must say I sounds nowhere near as good as the previous native option. A little too fast and too machine like.
« Last Edit: August 16, 2015, 12:14:07 AM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

September 19, 2015, 05:54:48 PM
Reply #13

BruceS

  • *
  • Information
  • Newbie
  • Posts: 13
Here is my workaround when Program.Say stops working and you need static phrases spoken.  Go to translate.google.com and type in your spoken phrase.  It will then produce an mp3 file.  Convert it to a wav file and save it to your homegenie server. Use Program.Play command to play the wav file. There are many options to accomplish this but here is how I did it.

1) Go to http://soundoftext.com and type in "The garage door is up.".  Save the result mp3 file to a temporary location.

2) Go to http://media.io and upload your mp3 file.  Select wav output format. Select Convert.  Select Download.

3) Save the wav file to a /wav folder in the root of homegenie. (/usr/local/bin/homegenie/wav/garageDoorUp.wav)

4) Play the wav file with this command. Program.Play("wav/garageDoorUp.wav");

October 17, 2015, 07:13:45 AM
Reply #14

jon

  • **
  • Information
  • Jr. Member
  • Posts: 32
For those running Raspbian and any other debian derivative, you can install Pico-TTS.

Code: [Select]
sudo apt-get install libttspico-utils

HomeGenie will automatically find it and use it instead of the Google online text2speech engine.
The good thing about using Pico is that it works offline as well.
 


Hi Gene
I am running homegenie on ubuntu 14.04 desktop pico installed. But how do i activate homegenie to tts
do i need a script ?
Please advise.
Thanks,
Jon