TTS/Text To Speech synthesizer, background music overlay assembler and audio file converter for PBX and Home Automation Systems
Author: Ugo Viti ugo.viti@initzero.it
izSynth is a bash script running under Linux, written to automate the synthesis of voices used into izPBX System or for realtime TTS (Text To Speech) used into Home Automation solutions. It can use offline synthesis software like Loquendo (using the Wine environment), eSpeak, Festival, VoiceRSS, NaturalReaders, and other popular online web TTS services to synthesize audio voices from ASCII text files and automatically merging the audio with background music (mp3 and wav format are supported), adding silences and fade in and out.
Follow and contribute the development on GitHub: https://github.com/ugoviti/izsynth
izsynth -L
. NB. some engines need an APYKEY to works)izsynth -l
)izsynth -h
Before installing izsynth, install the dependencies for your distribution:
yum install -y epel-release
yum install -y sox lame mplayer curl espeak wine
sudo apt-get update
sudo apt-get install -y sox lame mplayer curl espeak wget bsdmainutils file mawk coreutils
For windows sapi5 support, install the wine
package and download sapi2wav.exe:
wget https://gitlab.mister-muffin.de/josch/novel2audio/raw/master/sapi2wav.exe -O /usr/local/bin/sapi2wav.exe
Stable Release
Download latest stable version of izSynth package from https://github.com/ugoviti/izsynth/releases and uncrompress it into a system binary PATH, ex. /usr/local/bin
Development Release
cd /usr/local/bin && wget https://raw.githubusercontent.com/ugoviti/izsynth/master/izsynth -O izsynth && chmod 755 izsynth
You can update izSynth using the same command you used to install it.
Before using izsynth, we must configure and try it via command line.
Make a quick test with the following command:
izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark"
NB. Some engines, like voicerss, need an APY KEY before you can use it, follow the onscreen guide to get your APY KEY:
izsynth -e voicerss -H
izSynth is configurable in 3 ways:
izsynth -h
to list available options or izsynth -E
for usage examples)I suggest to create an external config file to avoid changes to your configurations when you update izsynth script.
Create/Update the izsynth config file: $HOME/.config/izsynth/izsynth.conf
$ izsynth -C
and edit it using your prefered text editor.
NB. if the $HOME/.config/izsynth
directory doesn't exist, izsynth will create it on the first run
REMEMBER: the command line options have priority against the config file
Now let's try the various izsynth options available.
izsynth allow for example to put a background music in every synthesized file, or you can mix various languages and engines in one (MEGAMIX feature)... use the command izsynth -E
to discover.
Make izsynth say the current time without writing complex scripts:
izsynth -t "it's $(date +%H:%M)"
If the soundcard output volume is too low:
Use the -W switch to change the output volume of the hardware sound card:
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"
Use an external device (like bluetooth speaker) as playback output:
First configure the bluetooth stack and connect your izsynth box to the bluetooth speaker.
Now test the output from command line:
izsynth -t "I love domoticz" -d alsa:device=bluetooth
or to another audio card:
izsynth -t "I love domoticz" -d alsa:device=hw=2.0
you can list all local usable alsa devices with:
izsynth -D
Create voice announcements with background music
izsynth -e google -v en -m /path/music.mp3 -p 3 -P 2 -F 2 -t "Welcome home, mr Stark"