Page 5 of 7

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Thursday 16 June 2016 23:44
by Nautilus
jin wrote: can you run izsynth with:

Code: Select all

izsynth -D
and change the output device for the izsynth.
To playback to HDMI output:

Code: Select all

pi@raspberrypi ~/domoticz/scripts $ izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark" -d alsa:device=hw=0.1
Actually I had tried also these, but for some reason it did not seem to work with my initial testings. After some further digging I got also the hdmi to work but I'm really unsure what was the key there :) One thing at least was that my test sentences were quite short and the digital connection to receiver took some syncing time and thus cut about 2 second before any audio could be heard. Maybe my testing phrases were too short. I think I've now overcome that issue by adding

Code: Select all

force_hdmi_open=1
to /boot/config.txt

At least everything is working well for the time being :D Thanks a lot for your help!

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 17 June 2016 8:42
by toreandre
Nautilus wrote:
jin wrote: can you run izsynth with:

Code: Select all

izsynth -D
and change the output device for the izsynth.
To playback to HDMI output:

Code: Select all

pi@raspberrypi ~/domoticz/scripts $ izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark" -d alsa:device=hw=0.1
Actually I had tried also these, but for some reason it did not seem to work with my initial testings. After some further digging I got also the hdmi to work but I'm really unsure what was the key there :) One thing at least was that my test sentences were quite short and the digital connection to receiver took some syncing time and thus cut about 2 second before any audio could be heard. Maybe my testing phrases were too short. I think I've now overcome that issue by adding

Code: Select all

force_hdmi_open=1
to /boot/config.txt

At least everything is working well for the time being :D Thanks a lot for your help!
I have the exact same problem, the first 2 seconds of every sentence is cut (other people is have the same problem). I will try your solution.

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 17 June 2016 9:38
by Nautilus
toreandre wrote:
Nautilus wrote:
jin wrote:
At least everything is working well for the time being :D Thanks a lot for your help!
I have the exact same problem, the first 2 seconds of every sentence is cut (other people is have the same problem). I will try your solution.
Well, I spoke a bit too soon. It seems that the sentence is not cut if the receiver is powered and playing already something when the announcement is made (earlier it was cut also in this case). But if it is off, then it still cuts about 2 secs of each sentence, at least with hdmi. I'll test 3.5mm again...

edit: 3.5mm does not help in this situation

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 17 June 2016 11:27
by toreandre
So if we were able to delay the speech for a few seconds it might work?

I have noticed that if i try this in commandline, i get the 2 second cutoff, but if i execute the same command when izsynth is already speaking i can hear the whole sentence (as you mentioned).

So there is something that is delaying the output when izsynth is sending the audio to the speaker.

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 17 June 2016 18:56
by Nautilus
I think the delay is caused because the receiver needing to sync the bit stream or something like that. Therefore I assumed the analog 3.5mm would solve it but apparently not. I also noticed that the audio quality of the voicerss service which I'm using has gotten worse for some reason. There is some clipping / distortion in the middle parts of a longer output as well. Didn't notice the same with e.g. natural readers. Maybe some quality issue of the received audio file can also be the cause?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Tuesday 21 June 2016 8:03
by Nautilus
Well, now I updated the script (just replaced with wget) and for some reason it only plays the first word of the synthesised string. Any ideas what that could be coming from? Can I somehow go back to the previous version?

edit: downloaded the previous version and the same thing -> rebooted the RPi and everything works again the way it did, also with the new version :D

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Tuesday 21 June 2016 21:16
by jin
Nautilus wrote:Well, now I updated the script (just replaced with wget) and for some reason it only plays the first word of the synthesised string. Any ideas what that could be coming from? Can I somehow go back to the previous version?

edit: downloaded the previous version and the same thing -> rebooted the RPi and everything works again the way it did, also with the new version :D
are you running izsynth with or without option -w ?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Tuesday 21 June 2016 22:20
by Nautilus
Hi,

not using the -w option but as I mainly use it for weather announcements I have always the -r option so it does not try to play the same file again as it gets removed.

Btw, is there some default delay in place or is it just used if there is background music (-p option)? Seems there is some delay but not sure if it is this or the fact it just takes time to produce the output. Also, I was thinking the background music might be the way to solve the cutting issues if it could be started a set number of seconds before the synthesised audio?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Thursday 23 June 2016 7:52
by Nautilus
Well, same thing happened again - no output and when checking with ps aux the process looks to be running but nothing happens. Reboot solves the issue, strange?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 24 June 2016 1:02
by jin
Nautilus wrote:Well, same thing happened again - no output and when checking with ps aux the process looks to be running but nothing happens. Reboot solves the issue, strange?
yes pretty strange... anyway the synth speedup depends on engine type (some engines are more fast) and your internet connection speed..

about the initial time before speak, you can automatically put background music with a starting pad (you can use a silence wav file as workaround), for example try (google engine is pretty fast):

Code: Select all

script://izsynth -e google -v en -m /your/path/music.wav -p 3 -P 1 -F 0 -t "Welcome home, mr Stark"
NB. you can use mp3 file as background, but wav is more fast, because izsynth every time convert from mp3 to wav

with kind regards

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Wednesday 29 June 2016 23:29
by Nautilus
Sorry, have been on holiday and haven't had a chance yet to test the above - and would be a bit hard now as well when the family is already asleep :) But I confirmed the "plays only the first word" ( = a second or so) issue is related somehow to mplayer. Once I changed to omxplayer - for which I'm using:

Code: Select all

 -k omxplayer -K "-o hdmi" -d ""
it plays the whole sentence without problems. The issue is present with mplayer also if I just execute it like "mplayer /path/to/file.mp3" so must be something in my setup. It throws these errors:

Code: Select all

AO: [pulse] Init failed: Connection refused Failed to initialize audio driver 'pulse'
 libavformat version 53.21.1 (external) Mismatching header version 53.19.0
Anyhow, probably nothing to worry from the izsynth script's perspective :) And a reboot mysteriously fixes it :D

I'll try to check tomorrow whether the silent background music would help in case the receiver is powered on...

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Thursday 30 June 2016 13:59
by Nautilus
Based on initial testing it works! When "padding" a silent .wav to play as background music the way you suggested, it plays from the beginning of the sentence even when powering on the receiver. Thanks! :D

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Sunday 10 July 2016 9:00
by Zycker
Hi,
I'm coming back here as I can't solve my problem : Izsynth works perfectly when I use it through SSH but it stay mute via Domoticz.
I've followed the wiki, created my izsynth.conf, etc.

This command for exemple :

Code: Select all

izsynth -t "Il est $(date +%H:%M) minute" -r
Works fine via SSH, I've created a dummy switch for testing purpose

Code: Select all

Action ON script:///home/serveur/domoticz/scripts/test.sh

Code: Select all

Action OFF script://izsynth -t "Il est $(date +%H:%M) minute" -r
The content of test.sh :

Code: Select all

 #!/bin/bash
/home/serveur/domoticz/scripts/izsynth -t "Il est $(date +%H:%M) minute" -r
Executing test.sh via SSH result as speaking but absolutly nothing via the command of the switch although I've a lot of switch using bash scripts working fine.

In the log :
Executing script: /home/serveur/domoticz/scripts/test.sh
Any ideas ?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Sunday 31 July 2016 21:41
by Zycker
Hi, I'm back.
I figured out my original problem, as domoticz run as root and I had no soundcard configured by default for the root user, I couldn't have sounds.
Now it's working, I have personnalized my izsynth.conf for the root user by I have another problem, I've made myself a bash script with different things to say, it works fine but not when executed by domoticz.
- executingscript:///home/serveur/domoticz/scripts/izsynth -t "Welcome Home" OK (french voice, lower volume)
- executing my script from shell (as user or as root) OK (french voice, lower volume)
- executing script:///home/serveur/domoticz/scripts/annonces.sh date NOK (english voice, standard volume)

It's driving me mad, it takes me some time to build this script but it won't run well in domoticz :?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Tuesday 02 August 2016 0:17
by markk
Hi

I'm falling over on the very first post of this. following the instructions and just getting this! Please help.
izsynth.png
izsynth.png (46.26 KiB) Viewed 5570 times

EDIT: I'm still not able to get past this point :(
Is there a way I can install this manually?

EDIT EDIT: It appears that my ISP (VM) was blocking the SSL connection. A google search showed this to have happened to others too. I have now moved providers (not just because of this issue) tried again and izSynth installed easily.

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Monday 08 August 2016 17:05
by jin
Hi,

With wget, try eg. --secure-protocol=tlsv1 or --secure-protocol=sslv3

try searching google:

https://www.google.it/?gws_rd=ssl#safe= ... connection

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Wednesday 10 August 2016 14:17
by markk
jin wrote:Hi,

With wget, try eg. --secure-protocol=tlsv1 or --secure-protocol=sslv3

try searching google:

https://www.google.it/?gws_rd=ssl#safe= ... connection
Thanks for your reply. On Monday evening I was following the suggestions in the link you provided when my internet connection bombed out (I hope that was only coincidence!) so couldn't carry on trying. Now waiting for a Virgin Media engineer visit tomorrow!!

Seriously though, could the internet have gone down because of something I did whilst doing wget --secure-protocol=tlsv1 and --secure-protocol=sslv3??

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Friday 26 August 2016 21:38
by andyvercammen
is there a way to also run this on Windows?
I tried with downloading the windows version of mplayer, sox, iconv, lame, grep, bash, file

When I run the test i get a directory error. Guess not all the references can be fixed by downloading the linux tools for windows :)

c:\test>"c:\Program Files\Git\bin\sh.exe" izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark" -w
ERROR: '' invalid input file/directory - abort.

If this can't be run under windows, is there a windows alternative to run a script like this with domoticz? Or maybe I am missing some other linux programs in the list above?

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Sunday 09 October 2016 15:02
by pvm
There's a separate thread on Bluetooth (as well as wiki). Might help

Re: izSynth: make domoticz talk with many TTS engines in a easy way

Posted: Wednesday 19 October 2016 21:35
by Zycker
Yes, I've edited izsynth.sh so it match the config I initialy did (soundcard, language, voice), that did the job.

Envoyé de mon SM-T810 en utilisant Tapatalk