IBM Watson TTS
This package leverages IBM Watson's TTS A.P.I to stream audio of text using pyaudio. This improves performance response.
Requirements
- Python 2.7 or higher
- pip
- portaudio[1]
[1] Can be installed with brew install portaudio
(MAC OS) or apt-get install portaudio19-dev
(Linux).
Installation
Run: pip install tts-watson
CLI
Your Waston credentials will be initially requested. A config file located at ~/.config-tts-watson.yml
will be created.
Run in the command line: tts-watson text to sound i want
. You will hear text to sound i want
played back to you.
Example Of Usage
from tts_watson.TtsWatson import TtsWatson
ttsWatson = TtsWatson('watson_user', 'watson_password', 'en-US_AllisonVoice') #[2]
ttsWatson.play("The text which i want to be a sound")
[2] en-US_AllisonVoice
is one of many possible voices to use. You can see the full list here and descriptions here.