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

All kinds of 'OS' scripts

Moderator: leecollings

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

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

Post by jin »

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: 784
Joined: Wednesday 10 December 2014 13: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 »

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 / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13: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 »

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 / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 »

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: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

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

Post by korniza »

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: 62
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by jin »

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: 62
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by jin »

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: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 »

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: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by remb0 »

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 15: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 »

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: 62
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by jin »

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
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

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

Post by Derik »

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: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN »

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: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN »

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: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN »

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: 58
Joined: Tuesday 14 November 2017 21:56
Target OS: Linux
Domoticz version:
Contact:

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

Post by glsf91 »

jin wrote: Sunday 18 December 2016 20: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: 62
Joined: Thursday 18 September 2014 20:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by jin »

glsf91 wrote: Thursday 15 March 2018 20: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: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN »

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: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

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

Post by DewGew »

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 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

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

Post by EdddieN »

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 1 guest