Outils de synthèse vocale

EDGE-TTS

pip install edge-tts
edge-tts --list-voices
edge-tts --list-voices | grep fr
edge-tts --voice fr-FR-HenriNeural --file lorem-ispum.txt --write-media lorem.mp3

GTTS

pip install gTTS
gtts-cli --lang fr --file lorem-ispum.txt --output lorem.mp3

SVOXPICO

sudo apt install libttspico-utils
cat lorem-ispum.txt | pico2wave --lang fr-FR --wave lorem.wav

ESPEAK + MBROLA

sudo apt install espeak-ng-espeak mbrola
cat lorem-ispum.txt | espeak -v fr -w lorem.wav   # use default espeak french voice
espeak --version                                  # get espeak data location
espeak --voices=fr                                # list french voices
sudo apt install mbrola-fr1 mbrola-fr2 mbrola-fr3 # download Mbrola voices
sudo apt install mbrola-fr4 mbrola-fr5 mbrola-fr6 mbrola-fr7
for i in `echo "1 2 3 4 5 6 7"` ; do $(cat lorem-ispum.txt | espeak -v french-mbrola-$i -w lorem.$i.wav) ; done

FESTIVAL

sudo apt install festival
cat lorem-ispum.txt | text2wave -o lorem.wav

SOX

sudo apt install sox libsox-fmt-mp3
sox --type wav --channels 1 lorem.wav --type mp3 lorem.mp3

TODO

TORTOISE TTS

pip install tortoise-tts
tortoise_tts.py --help

BARK

pip install git+https://github.com/suno-ai/bark.git
python3 -m bark --text "Hello, my name is Suno." --output_filename "example.wav"
from bark import preload_models generate_audio SAMPLE_RATE
from scipy.io.wavfile import write as write_wav
preload_models()                                             # download and load all models
f = open("lorem-ipsum.txt", "r")                             # generate audio from text
audio_array = generate_audio(f.read())
write_wav("bark_generation.wav", SAMPLE_RATE, audio_array)   # save audio to disk

TERMUX-TTS-SPEAK

Sur Termux:

pkg install termux-tts-speak
termux-tts-speak "Faites demi-tour dès que possible !"
pkg install python3 wget
python -m pip install -U pip
wget https://its-pointless.github.io/setup-pointless-repo.sh
bash setup-pointless-repo.sh
rm setup-pointless-repo.sh
pkg install portaudio portaudio-dev
python -m pip install pyaudio

Autres divers

Liens utiles

Scrapping Wikidot et Wikimedia