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

All kinds of 'OS' scripts
korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Wednesday 04 May 2016 0:07

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.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

jin
Posts: 223
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by jin » Wednesday 04 May 2016 10:04

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! ;)

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Wednesday 04 May 2016 11:29

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 "--
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

toreandre
Posts: 110
Joined: Tuesday 19 January 2016 13:51
Target OS: -
Domoticz version:
Contact:

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

Post by toreandre » Wednesday 04 May 2016 11:36

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?

woody4165
Posts: 530
Joined: Monday 14 March 2016 14:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

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

Post by woody4165 » Wednesday 04 May 2016 12:43

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
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Wednesday 04 May 2016 14:36

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.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

micbou
Posts: 88
Joined: Sunday 01 May 2016 0:34
Target OS: Raspberry Pi
Domoticz version:
Location: NL
Contact:

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

Post by micbou » Wednesday 04 May 2016 15:44

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

jin
Posts: 223
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by jin » Wednesday 04 May 2016 23:41

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

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Wednesday 04 May 2016 23:57

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. :|
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

jin
Posts: 223
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by jin » Thursday 05 May 2016 0:50

This is a domoticz bug, please post a bug report.

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Thursday 05 May 2016 1:34

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
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Thursday 05 May 2016 2:00

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?
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

jin
Posts: 223
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by jin » Thursday 05 May 2016 21:23

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 3232 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

toreandre
Posts: 110
Joined: Tuesday 19 January 2016 13:51
Target OS: -
Domoticz version:
Contact:

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

Post by toreandre » Thursday 05 May 2016 22:02

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.

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Saturday 07 May 2016 12:02

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/
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

micbou
Posts: 88
Joined: Sunday 01 May 2016 0:34
Target OS: Raspberry Pi
Domoticz version:
Location: NL
Contact:

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

Post by micbou » Saturday 07 May 2016 14:10

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!!

micbou
Posts: 88
Joined: Sunday 01 May 2016 0:34
Target OS: Raspberry Pi
Domoticz version:
Location: NL
Contact:

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

Post by micbou » Saturday 07 May 2016 21:25

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)

korniza
Posts: 198
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza » Saturday 07 May 2016 21:37

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?
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

micbou
Posts: 88
Joined: Sunday 01 May 2016 0:34
Target OS: Raspberry Pi
Domoticz version:
Location: NL
Contact:

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

Post by micbou » Sunday 08 May 2016 0:06

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

jin
Posts: 223
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by jin » Sunday 08 May 2016 11:28

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest