Skip to content

Instantly share code, notes, and snippets.

@dejanstojanovic
Forked from sourceperl/say_cpu_temp.py
Last active October 12, 2017 17:21
Show Gist options
  • Save dejanstojanovic/7afa71cdc5b77f86823bb0f93a5135a3 to your computer and use it in GitHub Desktop.
Save dejanstojanovic/7afa71cdc5b77f86823bb0f93a5135a3 to your computer and use it in GitHub Desktop.
Text to speak software with espeak and mbrola for Raspberry Pi2 (under Raspbian/jessie)
# install espeak
sudo apt-get install espeak
# install mbrola
wget http://tcts.fpms.ac.be/synthesis/mbrola/bin/raspberri_pi/mbrola.tgz
tar xvzf mbrola.tgz
chmod 755 mbrola
sudo mv ./mbrola /usr/local/bin/
# install voices for mbrola
wget http://tcts.fpms.ac.be/synthesis/mbrola/dba/fr1/fr1-990204.zip
sudo unzip fr1-990204.zip -d /opt/mbrola
sudo mkdir -p /usr/share/mbrola/voices/
sudo cp -r /opt/mbrola/fr1/* /usr/share/mbrola/voices/
# test it !
espeak -s 125 -v mb/mb-fr1 'installation terminé. On peux maintenant utiliser espeak !'
# sample script for use with python
# #!/usr/bin/env python
# # -*- coding: utf-8 -*-
#
# import os, time
#
# var1 = 0
#
# while True:
# os.system('espeak -v mb-fr1 -s 120 \'variable var1 égale à %s\'' % var1)
# var1 += 1
# time.sleep(1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment