A Python module for text-to-speech conversion using an open API
Project description
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
# Initialize TextToSpeech with your API URL
tts = TextToSpeech("http://your-api-url:port")
# List available voices
print(tts.list_voices())
# Get available languages
print(tts.get_languages())
# Convert text to speech
output_file = tts.convert("Hello, world!", "emma", speed="normal", output_file="hello.wav")
# Play the generated audio
if output_file:
tts.play_audio(output_file)
# Display languages and models
tts.display_languages_and_models("terminal") # Display in terminal
tts.display_languages_and_models("web") # Display in web browser
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
open_tts-2.0.0.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file open_tts-2.0.0.tar.gz
.
File metadata
- Download URL: open_tts-2.0.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b6e221d05bedb898dd62bf065e4a49b504e6311655592804d907cab2cb59c8 |
|
MD5 | 421fa38359464b93ddd35097444c4146 |
|
BLAKE2b-256 | 1645fddbb5f0ea56b4d81e436ea8d7a71d953d96e7a00c70de5f67dca86267e6 |
File details
Details for the file open_tts-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: open_tts-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6462d4c9006b20cbc219ab5c34f0a21beb41003f9357d6b4026bf6233cb8e383 |
|
MD5 | 18717e0ab486d8b4fea40a3ab9ab301d |
|
BLAKE2b-256 | a3d95fd1f8575ee910fefdaf20edb10139129557c40852a05ef8779543f9b95e |