Here is some info about PicoTTS if any one interested.
Here is the demo: View Demo
Installing PicoTTS
sudo su
cd /
wget http://incrediblepbx.com/picotts-raspi.tar.gz
tar zxvf picotts-raspi.tar.gz
rm -f picotts-raspi.tar.gz
cd /root
./picotts-install.sh
Testing PicoTTS
pico2wave --wave sample.wav -l en-US "Here is a sample, using the PICO text to speech engine."
aplay sample.wav
Below is the Shell script will take the “Text” as argument to speech conversion
Shell Command File: TTS_Play.sh
#!/bin/bash
pico2wave -w /tmp/omx.wav "$1"
#below line just to play chime sound to gather attention
aplay -Dplughw:CARD=ALSA,DEV=0 /home/homeassistant/.homeassistant/chime.wav
aplay -Dplughw:CARD=ALSA,DEV=0 /tmp/omx.wav
HA Configuration yaml:
input_boolean:
motion_livingroom_override:
initial: on
shell_command:
ttsplay: '/home/homeassistant/.homeassistant/TTS_Play.sh "Hareesh, You have a visitor!"'
automation 2:
- alias: Alert Motion
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_3_1
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.motion_livingroom_override
state: 'on'
action:
- service: notify.myhtml5
data:
message: 'Motion Deteted at Main Gate!!'
title: 'Home Assistant Alert'
- service: shell_command.ttsplay
We can configure the shell_command section with what ever text we need to send to the TTS engine.