How to make Raspberry Pi2 Raspbian to talk with Festival.
Install festival.
Code: Select all
sudo apt-get -y install festivalCode: Select all
amixer cset numid=3 1Code: Select all
echo "Hi dude, how can I help you?" | festival --ttsCode: Select all
hostname | festival --ttsCode: Select all
festival --tts "file"Code: Select all
date "+%H:%M %P %A %d %B %Y"| festival --ttsWe need an application to aloud us pipe the text from Internet to festival 'xsel'
Code: Select all
sudo apt-get install xselCode: Select all
cat << eof > talk.sh
#!/bin/bash
xsel | festival --tts --pipe
eofCode: Select all
chmod +x talk.shCode: Select all
~/.config/openbox/lxde-pi-rc.xmlCode: Select all
nano ~/.config/openbox/lxde-pi-rc.xmlCode: Select all
<keybind key= "Name of key">
<action name= "Execute">
<execute>Command name</execute>
</action>
</keybind>Code: Select all
<!--Keybindings for Festival -->
<keybind key= "C-Menu">
<action name= "Execute">
<execute>/home/pi/talk.sh</execute>
</action>
</keybind>If you are wondering what happens when you push a button use the command 'xev' in terminal when you press a key, the shell will tell his name then you can use it to make the shortcuts.
Of course you can run festival with 'festival' command an read things.
Run festival.
Code: Select all
festival Code: Select all
(Saytext "Hello world")Code: Select all
(tts "file" nil)Code: Select all
(quit)I take this opportunity to ask you to share your progress with festival, let's make this topic a great post.
I'm working on handling the raspberry with voice commands, and answer me via julius. I'm sure many people would like the idea, let's work together.
see you!!
source: My place (with pics)