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

All kinds of 'OS' scripts
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 » Friday 28 October 2016 23:33

Hi,

I just release 4.4 version of izSynth:
4.4 - 20161028
- implemented -C option to write/overwrite the izsynth user config file
- some sanity checks to detect the $HOME directory of user
follow the domoticz wiki for update/install instructions:

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

can someone confirm that this version fix the $HOME directory variable not working when running inside domoticz?

with kind regards

deennoo
Posts: 937
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

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

Post by deennoo » Saturday 29 October 2016 8:32

Looking some same kind of solution, best best best thing will be to integrate it to domoticz core and use notification system (easy to say, not to do, i know because need a C implantation and a C embedded tts engine).

Dream can be a upnp/dlna integration and aviability to use tts true this.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

deennoo
Posts: 937
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

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

Post by deennoo » Saturday 29 October 2016 9:53

Or one first easy improvement can be use http notification system :

Something base of this french user provid a python script who allow to send sms using android app : SMSGATEWAY ULTIMATE.

With this we can use notification system quite easily, and freeing action on/off for something else.

Config Pics :

https://drive.google.com/open?id=0B9emA ... zU4Qi1VNWM

https://drive.google.com/open?id=0B9emA ... TdPeE53UE0

french Howto about it :

http://easydomoticz.com/une-plateforme- ... omoticz-2/

If it can give you some help
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

User avatar
remb0
Posts: 976
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 » Saturday 26 November 2016 22:16

first: great app! But I was looking to get it working with voicerss (works!) but then in dutch. But is this possible with an parameter?

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 » Sunday 27 November 2016 7:29

I used this for some months and it is working perfect! I've got Google Home which does not include any bluetooth interface and still do not have any push notifactions. I'm curious if there is any way to use Google Home as speaker and send the output of izsynth using chromecast protocol.
I found a player that is suppose to do it ( https://github.com/xat/castnow ) but izsynth use mplayer as default to play sound.

I also found that there is pulseaudio-dlna plugin but
1. not available for raspberry/debian
2. I do not like pulseaudio for many reasons.
>>>> 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 » Sunday 18 December 2016 21:38

korniza wrote: I found a player that is suppose to do it ( https://github.com/xat/castnow ) but izsynth use mplayer as default to play sound.
Hi, you can choose the audio player in two way, for example:

Command Line:

Code: Select all

izsynth -k castnow -K "" -d "" -t "Welcome home korniza"
Configuration File:

Code: Select all

vim ~/.config/izsynth/izsynth.conf

PLAYBACK_COMMAND="castnow" 
PLAYBACK_COMMAND_OPTS="" 
PLAYBACK_DEVICE=""
With kind regards

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 18 December 2016 22:47

remb0 wrote:first: great app! But I was looking to get it working with voicerss (works!) but then in dutch. But is this possible with an parameter?
Hi remb0,

like this?

Code: Select all

izsynth -v voicerss -v "German Reiner" -t "Guten morgen rembo" -w
explain me better please.

User avatar
remb0
Posts: 976
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 » Monday 19 December 2016 7:19

in the voicers api I found: nl-nl for Dutch.
but in the settings file there is no language sample ?
what to put in the config file?

User avatar
remb0
Posts: 976
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 » Wednesday 21 December 2016 22:39

great thanks justin. I made an sh script that start speaking the givin parameter.

Code: Select all

#!/bin/sh
killall mplayer
#mplayer -ao alsa -noconsolecontrols -endpos $1 -playlist $2 > /dev/null 2>&1
izsynth -t "$1"
#izsynth -e google -v nl 
in lua I have a function in a separate lua function file:

Code: Select all

function My.PlaySound(msg)
	Debug='Y'
    if (Debug == 'Y') then print('>> Alarm zegt: '.. msg)     end
	os.execute ("sudo killall mplayer")
	os.execute ("sh /home/pi/domoticz/scripts/bash/Play_sound.sh '" .. msg .. "' ")
end
and in my scripts:

Code: Select all

	package.path = package.path .. ';' .. '/home/pi/domoticz/scripts/lua/?.lua'
	My = require('MyFunc')

    My.PlaySound('Alarm gaat over 60 sec af.')

dgonneau
Posts: 7
Joined: Tuesday 16 February 2016 16:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by dgonneau » Tuesday 21 March 2017 23:59

Hi,

Has anyone been able to run izSynth on synology ? (debian chroot maybe ?)
I have domoticz and LMS on the synology and my target is to make domoticz speak with tts :)

Kind Regards

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 » Saturday 22 April 2017 23:16

I never tested izsynth on Synology, I'm sorry.

anyway, izsynth need:

Code: Select all

bash
gnu coreutils
gnu awk
gnu sed
curl
md5sum
file
iconv
soxi
sox
lame
mplayer
Kind Regards

User avatar
Derik
Posts: 2150
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

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

Post by Derik » Sunday 23 April 2017 10:55

Is there some youtube example of this script?
Include dutch language?

Is there a hardware advice?
Is it possible to use multiple mics on 1 Pi?
Can i share mic from a master Domoticz to a slave?
I will have in more rooms a mic and speakers...
In the whole house,.... :-)
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
EdddieN
Posts: 454
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN » Thursday 03 August 2017 18:19

Fantastic work! All working great!

Just one thing I noticed:

If I edit the config file it uses its settings when using the command line, but if I call it from within Domotics [script:// izsynth "Hola"] it reverts back to defaults settings in english. However I can change it by adding the [-v voicerequired] within the call of the script.

Has anyone experienced this?
11101101 - www.machinon.com

User avatar
EdddieN
Posts: 454
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN » Saturday 05 August 2017 12:45

Quick question, is is possible to tell izSynth to pick up a random mp3 file from a folder?

Basically I want Domoticz to randomly say curious/funny things. Trying to add a bit of personality to it, not just pure logical stuff. A bit like having a special folder with jokes, funny comments or phrases that would make the system to fake a bit of AI
11101101 - www.machinon.com

User avatar
EdddieN
Posts: 454
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN » Saturday 17 February 2018 21:45

Anyone knows how to make izsynth to play an mp3 instead of converting it. I have tried with izsynth -i file.mp3 and work ok on console but not on the scripts.

Then tried to use mplayer but same results, works on console but not in script.

I'm using: os.execute ('mplayer faith.mp3')
11101101 - www.machinon.com

glsf91
Posts: 37
Joined: Tuesday 14 November 2017 22:56
Target OS: Linux
Domoticz version:
Contact:

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

Post by glsf91 » Thursday 15 March 2018 21:21

jin wrote:
Sunday 18 December 2016 21:38
korniza wrote: I found a player that is suppose to do it ( https://github.com/xat/castnow ) but izsynth use mplayer as default to play sound.
Hi, you can choose the audio player in two way, for example:

Command Line:

Code: Select all

izsynth -k castnow -K "" -d "" -t "Welcome home korniza"
Configuration File:

Code: Select all

vim ~/.config/izsynth/izsynth.conf

PLAYBACK_COMMAND="castnow" 
PLAYBACK_COMMAND_OPTS="" 
PLAYBACK_DEVICE=""
With kind regards
It is a long time ago but when I try

Code: Select all

izsynth -k castnow -K "" -d "" -t "Welcome home korniza"
I get:

ERROR: wrong PLAYBACK engine specified: 'castnow'

please select an engine from the following list:

Engine Version Name HomePage
---------------- ---------- ---------------- --------
mplayer 2016-12-18 MPlayer http://www.mplayerhq.hu/


castnow is working when using command: castnow coldplay.mp3


What is going wrong?

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 April 2018 16:36

glsf91 wrote:
Thursday 15 March 2018 21:21
I get:

ERROR: wrong PLAYBACK engine specified: 'castnow'

please select an engine from the following list:

Engine Version Name HomePage
---------------- ---------- ---------------- --------
mplayer 2016-12-18 MPlayer http://www.mplayerhq.hu/


castnow is working when using command: castnow coldplay.mp3


What is going wrong?
Hi,

just updated izsynth to 4.9 release

Update with:

Code: Select all

cd /usr/local/bin && wget https://raw.githubusercontent.com/ugoviti/izsynth/master/izsynth -O izsynth && chmod 755 izsynth
  • Implemented generic playback engine support. You can use -k to specify your playback command, and -K for the command options
Let's me know if it works as expected

Kind Regards

User avatar
EdddieN
Posts: 454
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN » Wednesday 11 April 2018 16:43

Hello,

Any idea why is returning an error?
sudo izsynth "Door opens"
== [1/1] - izsynth Name:[Door_opens] ===========================================
Synthesizing - input:[/dev/shm/izsynth-20180411-153426/Door_opens.txt] engine:[naturalreaders] voice:[Peter] output:[/dev/shm/Door_opens.mp3] size:[4.0K] type:[text/plain] result:[ERROR]
The folder has full permissions, etc..
I tried with sudo and it generates de mp3 file but still results on ERROR
11101101 - www.machinon.com

User avatar
DewGew
Posts: 254
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi
Domoticz version: V4.9741
Location: Sweden
Contact:

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

Post by DewGew » Friday 24 August 2018 16:39

EdddieN wrote:
Wednesday 11 April 2018 16:43
Hello,

Any idea why is returning an error?
sudo izsynth "Door opens"
== [1/1] - izsynth Name:[Door_opens] ===========================================
Synthesizing - input:[/dev/shm/izsynth-20180411-153426/Door_opens.txt] engine:[naturalreaders] voice:[Peter] output:[/dev/shm/Door_opens.mp3] size:[4.0K] type:[text/plain] result:[ERROR]
The folder has full permissions, etc..
I tried with sudo and it generates de mp3 file but still results on ERROR
I have the same issue as EdddieN. Is there any solution??
Raspberry Pi 2B - domoticz - Aeon Labs Z-Stick GEN5 - RFlink gateway
NanoPi NEO-air - domoticz - REGO6XX interface
Dashticz V2 - Homebridge

User avatar
EdddieN
Posts: 454
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN » Friday 24 August 2018 19:44

I ended up using mpg134 and just play mp3 files. Not as convenient as izsynth but faster to play within events
11101101 - www.machinon.com

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests