Last active
February 18, 2021 14:45
-
-
Save sourceperl/157fe9e7cb4a2fcb2836957c9d6bb1a3 to your computer and use it in GitHub Desktop.
Text to speak software with espeak and mbrola. Test on Raspberry Pi2 (Raspbian/jessie) and Pi4 (Raspbian/buster).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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