
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
The aiOla Text-to-Speech SDK provides Python bindings for aiOla's text-to-speech services, enabling high-quality voice synthesis with multiple voice options.
pip install aiola-tts
from aiola_tts import AiolaTtsClient, AudioFormat
# Initialize client
client = AiolaTtsClient(
base_url="your-base-url", # i.e https://api.aiola.ai
bearer_token="your-bearer-token",
audio_format=AudioFormat.LINEAR16 # or AudioFormat.PCM
)
# Synthesize text to speech
audio_data = client.synthesize(
text="Hello, world!",
voice="af_bella" # Optional, defaults to "af_bella"
)
# Save the audio data to a file
with open("output.wav", "wb") as f:
f.write(audio_data)
# Stream text-to-speech audio
streamed_audio = client.synthesize_stream(
text="Hello, world!",
voice="af_bella" # Optional, defaults to "af_bella"
)
# Process the streamed audio data
with open("streamed_output.wav", "wb") as f:
f.write(streamed_audio)
The SDK supports multiple voice options:
# Female voices
"af_bella" # Default voice
"af_nicole"
"af_sarah"
"af_sky"
# Male voices
"am_adam"
"am_michael"
"bf_emma"
"bf_isabella"
"bm_george"
"bm_lewis"
The SDK supports two audio formats:
from aiola_tts import AudioFormat
# LINEAR16 format (default)
client = AiolaTtsClient(
base_url="your-base-url",
bearer_token="your-bearer-token",
audio_format=AudioFormat.LINEAR16
)
# PCM format
client = AiolaTtsClient(
base_url="your-base-url",
bearer_token="your-bearer-token",
audio_format=AudioFormat.PCM
)
To install development dependencies:
pip install -e ".[dev]"
The SDK provides comprehensive error handling:
try:
audio_data = client.synthesize("Hello, world!")
except requests.exceptions.RequestException as e:
print(f"Error: {str(e)}")
MIT License
FAQs
Aiola Text-To-Speech Python SDK
We found that aiola-tts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.