py picotts
1.0.0
Some simple wrappers around SVOX Pico TTS intended to make using this TTS for wave file generation as convenient as possible.
Target audience are developers who would like to use SVOX Pico TTS as-is for speech synthesis in their Python application on GNU/Linux operating systems.
Constructive comments, patches and pull-requests are very welcome.
First, imports:
import wave
import StringIO
from picotts import PicoTTSenglish (default) synthesis:
picotts = PicoTTS()
wavs = picotts.synth_wav('Hello World!')
wav = wave.open(StringIO.StringIO(wavs))
print wav.getnchannels(), wav.getframerate(), wav.getnframes()result:
1 16000 22720
try a different language:
picotts.voice('de-DE')
wavs = picotts.synth_wav('Hallo Welt!')
wav = wave.open(StringIO.StringIO(wavs))
print wav.getnchannels(), wav.getframerate(), wav.getnframes()result:
1 16000 22464
l = picotts.voicesresult:
['de-DE', 'en-GB', 'en-US', 'es-ES', 'fr-FR', 'it-IT']
https://packages.debian.org/jessie/libttspico0 [Debian Package]
Python 2.7
pico2wave binary installed and in PATH
My own code is Apache-2.0 licensed unless otherwise noted in the script’s copyright headers.
Guenter Bartsch <[email protected]>