Page 1 of 7

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

Posted: Monday 25 April 2016 16:01
by jin
Hi,

I'm writing this post just for inform I published a new software to make domoticz talk using various TTS (Text-to-Speech) engines in an easy way:

http://www.domoticz.com/wiki/IzSynth

Two commands quick and dirty install and test guide: :) (taken from domoticz wiki)

Code: Select all

cd /home/pi/domoticz/scripts
wget https://raw.githubusercontent.com/ugoviti/izsynth/master/izsynth && chmod 755 izsynth
./izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark" -w
If you like it and want enhance izsynth, fork it and make patches using the official github repository:

https://github.com/ugoviti/izsynth

Kind regards

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

Posted: Tuesday 26 April 2016 8:22
by Derik
mmm looks very simple...
Are there different languages?
And is there perhaps a youtube movie to see the options?

What hardware do i need?
Is there option to use more mics in different rooms?

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

Posted: Tuesday 26 April 2016 9:12
by woody4165
Very nice!!!
Thanks for sharing.
Which TTS does support now?

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

Posted: Tuesday 26 April 2016 9:58
by jin
woody4165 wrote:Very nice!!!
Thanks for sharing.
Which TTS does support now?

Code: Select all

[jin@jlt ~]$ izsynth -L
Engine            Version     Type    Provider          APIKEY  Technology  HomePage
----------------  ----------  ------  ----------------  ------  ----------  --------
espeak            2015-12-19  Local   eSpeak            NO      OpenSource  http://espeak.sourceforge.net
festival          2015-12-19  Local   Festival          NO      OpenSource  http://www.cstr.ed.ac.uk/projects/festival
fromtexttospeech  2015-12-19  Remote  FromtextToSpeech  NO      IVONA       http://www.fromtexttospeech.com
naturalreaders    2015-12-19  Remote  NaturalReader     YES     Custom      http://www.naturalreaders.com
sapi5             2015-12-19  Local   SAPI5             NO      Microsoft   http://www.microsoft.com/en-us/download/details.aspx?id=10121
voicerss          2016-04-18  Remote  VoiceRSS          YES     Custom      http://www.voicerss.org

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

Posted: Tuesday 26 April 2016 21:19
by jmleglise
Hi,

That works great ! thank you !

1/ Check your wiki. You have some error in the command line of the "Install OS Dependencies" part.

2/ it's a shame that you can't change the volume for a text already synthetised. Isn't it possible to adjust the volume only in the playback ?

3/ I am on raspberryPi. I have failed to install wine. Did you succeed ? can you direct me to an howto ? (I think, windows sapi is the best autonomous TTS)

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

Posted: Wednesday 27 April 2016 0:23
by jin
jmleglise wrote:Hi,

That works great ! thank you !

1/ Check your wiki. You have some error in the command line of the "Install OS Dependencies" part.

2/ it's a shame that you can't change the volume for a text already synthetised. Isn't it possible to adjust the volume only in the playback ?

3/ I am on raspberryPi. I have failed to install wine. Did you succeed ? can you direct me to an howto ? (I think, windows sapi is the best autonomous TTS)
1) Thank you, fixed the domoticz wiki page:

Code: Select all

sudo apt-get update
sudo apt-get install -y sox lame mplayer curl espeak wget
2) you can change the hardware soundcard output volume using the -W switch
example:

Code: Select all

script://izsynth -W 90 -t "Can you hear me now?"
If you found the correct audio volume, I suggest to modify the config file, so you don't need to specify the -W switch every time:
PLAYBACK_VOLUME="90"

3) I used wine with SAPI5 only on x86 platforms, never tested Wine on ARM.... on RPi I suggest to use an online service (it's slow, depending of service engine and connection speed, only on first synth... the next playback is realtime because izsynth reuse the already synthesized audio file)

With kind regards

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

Posted: Wednesday 27 April 2016 20:55
by jmleglise
Hi,

Another feedback : I would appreciate in a future version an option to don't keep the audio file after the playback. Indeed, some sentences will never come again. (like reading news).
(for saving some disk space)

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

Posted: Thursday 28 April 2016 0:55
by jin
jmleglise wrote:Hi,

Another feedback : I would appreciate in a future version an option to don't keep the audio file after the playback. Indeed, some sentences will never come again. (like reading news).
(for saving some disk space)

Code: Select all

jin@jlt:~$ izsynth -h | grep keep
  -w                         Overwrite the synthesized file, otherwise keep it (current: no)
otherwise you can change the default behavior via izsynth.conf file:

set:

Code: Select all

PLAYBACK_RESYNTH="yes"
Read the domoticz wiki page to discover:

http://www.domoticz.com/wiki/IzSynth

With kind regards

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

Posted: Thursday 28 April 2016 12:45
by pvm
Is it possible to add https://www.ivona.com/ ? A very nice (even better than google) TTS with support for many languages and also free to use

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

Posted: Thursday 28 April 2016 12:55
by blackdog65
Hi Jin,

Great idea!
I've installed this and when tested with voicerss it works but not when trying to fire a script from a button.

Any Ideas

Sean

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

Posted: Thursday 28 April 2016 19:05
by jin
pvm wrote:Is it possible to add https://www.ivona.com/ ? A very nice (even better than google) TTS with support for many languages and also free to use
use the fromtexttospeech engine for IVONA voices...

example:

Code: Select all

izsynth -e fromtexttospeech -v Brian22 -t "Can you hear my bright voice now?" -w
with kind regards

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

Posted: Thursday 28 April 2016 19:06
by jin
blackdog65 wrote:Hi Jin,

Great idea!
I've installed this and when tested with voicerss it works but not when trying to fire a script from a button.

Any Ideas

Sean
Have you read carefully the wiki page? what syntax do you use in your buttons?

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

Posted: Thursday 28 April 2016 19:07
by toreandre
I cant get this to work.

Every engine i try i get error.
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicerss -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'voicerss' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicers -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'voicers' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e sapi5 -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'sapi5' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e espeak -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'espeak' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e espeak -v en-us -t "I love Domoticz Home Automation System"

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

Posted: Thursday 28 April 2016 19:12
by blackdog65
got it,
I needed the extra / and the full path i.e.

Code: Select all

script:///home/USER/domoticz/scripts/izsynth -t "say something clever"

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

Posted: Thursday 28 April 2016 19:28
by jin
toreandre wrote:I cant get this to work.

Every engine i try i get error.
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicerss -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'voicerss' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicers -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'voicers' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e sapi5 -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'sapi5' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e espeak -v en-us -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
/home/osmc/domoticz/scripts/izsynth: line 99: column: command not found
ERROR: the TTS Engine 'espeak' doesn't exist, or is not supported by the izsynth
osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e espeak -v en-us -t "I love Domoticz Home Automation System"

mmmm... interessting:

Code: Select all

pi@raspberrypi ~ $ dpkg -S /usr/bin/column
bsdmainutils: /usr/bin/column
what distro are you running?

If it's debian based, can you execute this command?

Code: Select all

sudo apt-get install bsdmainutils
Let's me know.. mean while I'll update the wiki with this package (I use the column command a lot).

Kind regards

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

Posted: Thursday 28 April 2016 19:29
by jin
blackdog65 wrote:got it,
I needed the extra / and the full path i.e.

Code: Select all

script:///home/USER/domoticz/scripts/izsynth -t "say something clever"
this is strange... what version of domoticz are you using?

since 3.x release, we can use the relative path, like

Code: Select all

script://izsynth
domoticz will search the command inside DOMOTICZ_HOME/scripts

any way the full path can be a solution (I don't like because the command become very long)

Thank you for sharing

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

Posted: Thursday 28 April 2016 20:38
by toreandre
jin wrote:

mmmm... interessting:

Code: Select all

pi@raspberrypi ~ $ dpkg -S /usr/bin/column
bsdmainutils: /usr/bin/column
what distro are you running?

If it's debian based, can you execute this command?

Code: Select all

sudo apt-get install bsdmainutils
Let's me know.. mean while I'll update the wiki with this package (I use the column command a lot).

Kind regards
Sorry, i forgot to mention my setup. Im using RPi2, domoticz 3.5051 and OSMC (debian jessie).

I keep forgetting that OSMC is a "light" version of debian so many standard packages is missing, the apt-get command solved the problem.

Thank you for your fast reply :)

Code: Select all

sudo apt-get install bsdmainutils

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

Posted: Thursday 28 April 2016 20:45
by toreandre
So i stumbled on another error, any idea of what this could be? i dont have a texteditor that shows the line numbers so its difficult to locate the command that gives the error.

Code: Select all

osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicerss -v nb-no -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 491: file: command not found
/home/osmc/domoticz/scripts/izsynth: line 487: file: command not found
Synthetizing - input:[/dev/shm/izsynth-20160428-204101/I_love_Domoticz_Home_Automation_System.txt] engine:[voicerss] voice:[nb-no] output:[/dev/shm/izsynth-20160428-204101/I_love_Domoticz_Home_Automation_System.mp3] size:[28K] type:[] result:[ERROR]

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

Posted: Thursday 28 April 2016 21:33
by blackdog65
jin wrote:this is strange... what version of domoticz are you using?

since 3.x release, we can use the relative path
My installation often has minor quirks that a put down to being on a cubietruck, however, I'm currently using v3.5065 which seems to have a mind of its own i.e. it will not allow itself to be upgraded viewtopic.php?f=6&t=11737 :shock: :?

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

Posted: Thursday 28 April 2016 21:42
by jin
toreandre wrote:So i stumbled on another error, any idea of what this could be? i dont have a texteditor that shows the line numbers so its difficult to locate the command that gives the error.

Code: Select all

osmc@osmcsoverom:~$ $HOME/domoticz/scripts/izsynth -e voicerss -v nb-no -t "I love Domoticz Home Automation System"
== [1/1] - izsynth Name:[I_love_Domoticz_Home_Automation_System] ===============
/home/osmc/domoticz/scripts/izsynth: line 491: file: command not found
/home/osmc/domoticz/scripts/izsynth: line 487: file: command not found
Synthetizing - input:[/dev/shm/izsynth-20160428-204101/I_love_Domoticz_Home_Automation_System.txt] engine:[voicerss] voice:[nb-no] output:[/dev/shm/izsynth-20160428-204101/I_love_Domoticz_Home_Automation_System.mp3] size:[28K] type:[] result:[ERROR]
mmmm... interesting :)

Code: Select all

pi@raspberrypi ~ $ which file
/usr/bin/file
pi@raspberrypi ~ $ dpkg -S /usr/bin/file
file: /usr/bin/file
can you run:

Code: Select all

sudo apt-get install file
izsynth is a bash script and it use many system commands to do the job, so these commands must be installed :)

just updated wiki, thanks!

let's me know is something is still missing.

kind regards