Open TTS
A Python module for easy text-to-speech conversion using an open API.
Installation
pip install open-tts
Usage
from open_tts import TextToSpeech
tts = TextToSpeech("http://your-api-url:port")
print(tts.list_voices())
print(tts.get_languages())
output_file = tts.convert("Hello, world!", "emma", speed="normal", output_file="hello.wav")
if output_file:
tts.play_audio(output_file)
tts.display_languages_and_models("terminal")
tts.display_languages_and_models("web")
Features
- Easy-to-use Python interface for text-to-speech conversion
- Support for multiple voices and languages
- Adjustable speech speed
- Audio playback functionality
- Display of available languages and models in terminal or web browser
API Configuration
When initializing the TextToSpeech class, provide your API URL:
tts = TextToSpeech("http://your-api-url:port")
For more information, please refer to the GitHub repository.