- first make sure your audio is going to where you want it to (i.e. not going through your HDMI cord to a screen that has no speaker).
-
sudo raspi-config
- Advanced Options
- Audio
- choose the output you want
-
- Next test the output by typing
-
aplay /usr/share/sounds/alsa/*
- You should hear files being play as they appear in the terminal.
-
- if still having problems
- make sure the speaker is plugged in
- make sure the speaker is on
- consult the raspberry pi documentation https://www.raspberrypi.org/documentation/configuration/audio-config.md
- For text to speak on the Raspberry Pi, install espeak
-
sudo apt-get install espeak
-
- Test it installed correctly with:
-
espeak "Text you wish to hear back" 2>/dev/null
- also can write:
echo "Text to speak" | espeak2 >/dev/null
- The “2>/dev/null” gets rid of the clutter. check out this for more explanation. https://askubuntu.com/questions/350208/what-does-2-dev-null-mean
-
- To modify the voice of espeak try:
-
espeak -vfr "Bonjour" 2>/dev/null
-
espeak -ven+f4 "Hello World" 2>/dev/null
- for more options check out this tutorial: https://www.dexterindustries.com/howto/make-your-raspberry-pi-speak/
-
- To use espeak with python type
-
sudo apt-get install python-espeak
- To download both espeak and python-espeak at the same time type:
sudo apt-get install espeak python-espeak
- To download both espeak and python-espeak at the same time type:
-
May 8, 2018
maddk840
May 8, 2018 — 10:19 am
http://electronut.in/making-the-raspberry-pi-speak/
maddk840
May 8, 2018 — 10:23 am
great tutorial: https://www.pubnub.com/blog/2015-10-14-text-to-speech-audio-broadcast-with-raspberry-pi/
maddk840
May 8, 2018 — 1:11 pm
this is the documentation for checking the voices cmd+f “Changing voices
” to run a script to check all the voices.
https://pyttsx.readthedocs.io/en/latest/engine.html