Page 3 of 7

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

Posted: Wednesday 04 May 2016 0:07
by korniza
I feel so happy guys!
As I included bluetooth tags to every famiy keyrings, domoticz (FHEM presence-> Domoticz Switch) recognise who is getting home and welcome him/her using izsynth. I have also some other bluetooth panic buttons that when they get pressed, there is a voice that prompt for security password before running lock down of the property!
I like to ask if there is available an option to direct sound to another audio output (for example bluetooth speakers) which are not the default of system, so I can use it on a LUA using time criteria.

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

Posted: Wednesday 04 May 2016 10:04
by jin
korniza wrote:I feel so happy guys!
As I included bluetooth tags to every famiy keyrings, domoticz (FHEM presence-> Domoticz Switch) recognise who is getting home and welcome him/her using izsynth.
Nice idea korniza! ;)

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

Posted: Wednesday 04 May 2016 11:29
by korniza
hm...bug found!
I just reboot my raspberry and appeared that no voice prompt can be reproduced from domoticz.
When I run command from shell is working. After creating the file manualy from console, domoticz also plays it. I suppose has to do with previliges. Any fix for this?

Error: Error executing script command (/home/pi/domoticz/scripts/izsynth). returned: 256
..."]:27: attempt to index global 'devicechanged' (a nil value)string "--

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

Posted: Wednesday 04 May 2016 11:36
by toreandre
korniza wrote:hm...bug found!
I just reboot my raspberry and appeared that no voice prompt can be reproduced from domoticz.
When I run command from shell is working. After creating the file manualy from console, domoticz also plays it. I suppose has to do with previliges. Any fix for this?

Error: Error executing script command (/home/pi/domoticz/scripts/izsynth). returned: 256
..."]:27: attempt to index global 'devicechanged' (a nil value)string "--
What happens to the "returned: 256" error if you put " & " after the on/off action in domoticz?
About the nil value error, isnt that a lua specific error?

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

Posted: Wednesday 04 May 2016 12:43
by woody4165
korniza wrote:I feel so happy guys!
As I included bluetooth tags to every famiy keyrings, domoticz (FHEM presence-> Domoticz Switch) recognise who is getting home and welcome him/her using izsynth. I have also some other bluetooth panic buttons that when they get pressed, there is a voice that prompt for security password before running lock down of the property!
...
Nice idea the BT stuff!

Can you share (maybe in another post) how you did it?

Thanks

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

Posted: Wednesday 04 May 2016 14:36
by korniza
toreandre wrote:
korniza wrote:hm...bug found!
I just reboot my raspberry and appeared that no voice prompt can be reproduced from domoticz.
When I run command from shell is working. After creating the file manualy from console, domoticz also plays it. I suppose has to do with previliges. Any fix for this?

Error: Error executing script command (/home/pi/domoticz/scripts/izsynth). returned: 256
..."]:27: attempt to index global 'devicechanged' (a nil value)string "--
What happens to the "returned: 256" error if you put " & " after the on/off action in domoticz?
About the nil value error, isnt that a lua specific error?
If I use "&" at the end of on/off Action, issue not resolved.
I also checked /dev/shm folder after reboot raspberry and triggering voice prompt from domoticz. No sound output from speakers. here are the files:
drwxr-x--- 2 root root 60 May 4 12:41 izsynth-20160504-124120
drwxr-x--- 2 root root 60 May 4 12:41 izsynth-20160504-124154
Running from console the same command (example: izsynth -e voicerss -v en-gb -t "Panic Button Triggered! Please stay calm while emergency process initiating. " ) I get a sound output from speakers and there are extra files on /dev/shm.
drwxr-x--- 2 root root 60 May 4 12:41 izsynth-20160504-124120
drwxr-x--- 2 root root 60 May 4 12:41 izsynth-20160504-124154
-rw-r--r-- 1 pi pi 624522 May 4 12:45 Panic_Button_Triggered__Please_stay_calm_while_emergency_process_initiating__.wav
-rw-r--r-- 1 pi pi 239754 May 4 12:44 Welcome_home.wav
So the issue is that using domoticz does not create wav files. Hope it helps for debugging.

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

Posted: Wednesday 04 May 2016 15:44
by micbou
korniza wrote:I feel so happy guys!
As I included bluetooth tags to every famiy keyrings, domoticz (FHEM presence-> Domoticz Switch) recognise who is getting home and welcome him/her using izsynth. I have also some other bluetooth panic buttons that when they get pressed, there is a voice that prompt for security password before running lock down of the property!
I like to ask if there is available an option to direct sound to another audio output (for example bluetooth speakers) which are not the default of system, so I can use it on a LUA using time criteria.
This is such an awesome idea! Going to use that too... thanks. Which tags are you using and did you use this script? viewtopic.php?t=5214

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

Posted: Wednesday 04 May 2016 23:41
by jin
korniza wrote: Running from console the same command (example: izsynth -e voicerss -v en-gb -t "Panic Button Triggered! Please stay calm while emergency process initiating. " ) I get a sound output from speakers and there are extra files on /dev/shm.
mmmm.... I must try to reboot my rpi to see if that problem happen to me too... anyway, in your text I see a problematic character: "!"

You have that problem with all izsynth buttons? can you make a new button with a simple:

script://izsynth test

I think that we need gizmocuz to solve that problem.

Kind regards

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

Posted: Wednesday 04 May 2016 23:57
by korniza
jin wrote:
korniza wrote: Running from console the same command (example: izsynth -e voicerss -v en-gb -t "Panic Button Triggered! Please stay calm while emergency process initiating. " ) I get a sound output from speakers and there are extra files on /dev/shm.
mmmm.... I must try to reboot my rpi to see if that problem happen to me too... anyway, in your text I see a problematic character: "!"

You have that problem with all izsynth buttons? can you make a new button with a simple:

script://izsynth test

I think that we need gizmocuz to solve that problem.

Kind regards
I test this simple button and also I get the same issue
2016-05-05 00:52:09.587 (Synth) Light/Switch (test)
2016-05-05 00:52:09.915 Executing script: /home/pi/domoticz/scripts/izsynth
2016-05-05 00:52:13.143 Error: Error executing script command (/home/pi/domoticz/scripts/izsynth). returned: 256
..."]:27: attempt to index global 'devicechanged' (a nil value)string "--
and checking the files
~/domoticz $ sudo ls -l /dev/shm/izsynth-20160505-005210/
total 4
-rw-r----- 1 root root 5 May 5 00:52 test.txt
there is only the txt file but not the wav file. :|

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

Posted: Thursday 05 May 2016 0:50
by jin
This is a domoticz bug, please post a bug report.

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

Posted: Thursday 05 May 2016 1:34
by korniza
micbou wrote:
korniza wrote:I feel so happy guys!
As I included bluetooth tags to every famiy keyrings, domoticz (FHEM presence-> Domoticz Switch) recognise who is getting home and welcome him/her using izsynth. I have also some other bluetooth panic buttons that when they get pressed, there is a voice that prompt for security password before running lock down of the property!
I like to ask if there is available an option to direct sound to another audio output (for example bluetooth speakers) which are not the default of system, so I can use it on a LUA using time criteria.
This is such an awesome idea! Going to use that too... thanks. Which tags are you using and did you use this script? viewtopic.php?t=5214
As I don't like to mess this thread about howto for bluetooth, please take a look on hardware/software was used on viewtopic.php?f=28&t=10640 . I feel glad to share ideas with you guys. Domoticz users are rocket engineers, but they do not know it :lol: :lol: :D

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

Posted: Thursday 05 May 2016 2:00
by korniza
jin wrote:This is a domoticz bug, please post a bug report.
Can you confirm that issue can be reproduced also to your system? anyone other can perform the test and trigger voice button after restarting raspberry?

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

Posted: Thursday 05 May 2016 21:23
by jin
korniza wrote:
jin wrote:This is a domoticz bug, please post a bug report.
Can you confirm that issue can be reproduced also to your system? anyone other can perform the test and trigger voice button after restarting raspberry?

Code: Select all

pi@domoticzpi ~/domoticz/scripts $ uptime
 21:12:30 up 95 days,  1:41,  1 user,  load average: 0,25, 0,09, 0,07
sigh ;( pity for my uptime :)

rebooted and izsynth recreated without problems the recordings when pressing the button.

this is my screenshot:
domoticz01.png
domoticz01.png (29.13 KiB) Viewed 5577 times

Code: Select all

2016-05-05 21:16:48.900 User: Admin initiated a switch command
2016-05-05 21:16:48.901 (Virtual) Light/Switch (Talker)
2016-05-05 21:16:49.398 Executing script: /home/pi/domoticz/scripts/izsynth
2016-05-05 21:16:52.964 User: Admin initiated a switch command
2016-05-05 21:16:52.966 (Virtual) Light/Switch (Talker)
2016-05-05 21:16:53.903 Executing script: /home/pi/domoticz/scripts/izsynth
I don't know because you get return code 256

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

Posted: Thursday 05 May 2016 22:02
by toreandre
Just made a clean install of the izsynth on one of my RPi's running domoticz 3.5051 and latest OSMC (debian jessie).

From the commandline i can get sound, but there is a problem. When i execute the command from the wiki only the last word in the sentence is beeing played.

Code: Select all

$HOME/domoticz/scripts/izsynth -e voicerss -v en-us -t "I love Domoticz Home Automation System"
So i tried to make the sentence longer and now i hear ".... system test test test"

Code: Select all

$HOME/domoticz/scripts/izsynth -e voicerss -v en-us -t "I love Domoticz Home Automation System test test test"
It seems like there is some problems with timing somewhere.

EDIT: Did some further testing, if i execute the "i love domoticz" sentence and exute it a second time WHILE the first sentence is already playing on the speakers i can hear the full sentence.

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

Posted: Saturday 07 May 2016 12:02
by korniza
it is strange but today script start to work but not for voicerss! also ispeech was busted as they add a extra prompt "powered by ispeech". We need an extra TTS machine. @Jin did you checked the API of IVONA? It supports 5000 prompts/month for free!

https://www.ivona.com/us/for-business/speech-cloud/

take also a look on pyvona (pyhton + ivona API)
http://zacharybears.com/pyvona/

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

Posted: Saturday 07 May 2016 14:10
by micbou
mmmm.... your config is right...
I tested creating a "Virtual Button" of type "Selector Switch" (..) but the script works perfectly and I can hear the voice when I activate the button...

can you try putting the full path of the script? like:

Code: Select all

script:///home/osmc/domoticz/scripts/izsynth test
I reinstalled IzSynth with Naturalreaders instead of VoiceRSS and it works like a charm now. Thanks for your help!!

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

Posted: Saturday 07 May 2016 21:25
by micbou
It really had something to do w/ VoiceRSS. I tried using it with my sonos integration and have the same issue there. (no error, no sound)

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

Posted: Saturday 07 May 2016 21:37
by korniza
micbou wrote:It really had something to do w/ VoiceRSS. I tried using it with my sonos integration and have the same issue there. (no error, no sound)
It is working through console but not from domoticz. suppose it has to do with API key that is not parsed from default conf?

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

Posted: Sunday 08 May 2016 0:06
by micbou
korniza wrote:
micbou wrote:It really had something to do w/ VoiceRSS. I tried using it with my sonos integration and have the same issue there. (no error, no sound)
It is working through console but not from domoticz. suppose it has to do with API key that is not parsed from default conf?
indeed. Wonder if anybody has found some sort of fix

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

Posted: Sunday 08 May 2016 11:28
by jin
micbou wrote:indeed. Wonder if anybody has found some sort of fix
can you paste the output of following commands? (run from the user running domoticz)

Code: Select all

echo $HOME

ls -al $HOME/.config/izsynth

cat $HOME/.config/izsynth/izsynth.conf

ls -al /dev/shm

ls -al $HOME/domoticz/scripts

ps aux | grep domoticz | grep -v grep

uname -a
Thankyou!