Skip to main content

Type-safe speech generation for Celeste AI. Unified interface for Google and more

Project description

Celeste Logo Celeste Speech Generation

Speech Generation capability for Celeste AI

Python License

Quick StartParametersRequest Provider


🚀 Quick Start

from celeste import create_client, Capability, Provider

# Create client
client = create_client(
    capability=Capability.SPEECH_GENERATION,
    provider=Provider.GOOGLE,
)

# Generate audio from text
response = await client.generate(prompt="Hello, this is a test.")
print(response.content)  # AudioArtifact with binary audio data

Install:

uv add "celeste-ai[speech-generation]"

🔄 Multi-Provider Support

# Switch providers with zero code changes
from celeste import create_client, Capability, Provider

# After implementing multiple providers, switch by changing one parameter:
client_a = create_client(Capability.SPEECH_GENERATION, Provider.OPENAI)
client_b = create_client(Capability.SPEECH_GENERATION, Provider.GOOGLE)
client_c = create_client(Capability.SPEECH_GENERATION, Provider.ELEVENLABS)

# Same method, same parameters, different results:
response_a = await client_a.generate(prompt="Your text", voice="alloy")
response_b = await client_b.generate(prompt="Your text", voice="Kore")
response_c = await client_c.generate(prompt="Your text", voice="default")

One API. Multiple providers. Zero vendor lock-in.


Supported Providers

Provider Status Models
Google ✅ Implemented gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts

Missing a provider? Request it – ⚡ we ship fast.

Use /implement-provider to add provider support.


Parameters

💡 Parameter Mapping: Celeste automatically translates unified parameter names to each provider's native format. Write voice once, we handle provider-specific voice IDs.

Parameter Type
- -

Parameters will be added as providers are implemented. Use /add-parameters to add parameter support.

Full parameter reference: API Docs


Streaming: ✅ Supported (3/4 providers confirmed)

Streaming support based on cross-provider research (OpenAI, ElevenLabs, Amazon Polly).


Examples

Basic Generation

# Generate audio from text
response = await client.generate(prompt="Hello, this is a test.")

# Access audio artifact
audio = response.content  # AudioArtifact
audio.mime_type  # "audio/mp3"
audio.data  # Binary audio bytes

Streaming Audio

# Stream audio as it's generated
stream = client.stream(prompt="This is a longer text to synthesize.")

async for chunk in stream:
    # Process audio chunks
    audio_bytes = chunk.content  # Raw bytes
    # Play or save chunks as they arrive

Switch Providers

# After multiple providers implemented
client = create_client(Capability.SPEECH_GENERATION, Provider.OPENAI)
response = await client.generate(prompt="...", voice="nova", speed=1.2)

🤝 Contributing

See CONTRIBUTING.md for guidelines.

Request a provider: GitHub Issues


📄 License

Apache 2.0 License – see LICENSE for details.


Get StartedDocumentationGitHub

Made with ❤️ by developers tired of framework lock-in

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celeste_speech_generation-0.2.3.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

celeste_speech_generation-0.2.3-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file celeste_speech_generation-0.2.3.tar.gz.

File metadata

File hashes

Hashes for celeste_speech_generation-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1bea0b9ed40858519a38edae8fe8848c3bd1fd090871299e4628f8b846d7a2b3
MD5 da57ac6b4e6ac2a092352872a48eabf9
BLAKE2b-256 10b9e623b11812dde7a302bcb639c9150caf67f6d3bb5bf3b373e273aaf32d42

See more details on using hashes here.

File details

Details for the file celeste_speech_generation-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for celeste_speech_generation-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd9d75efbd0fa2381cc6d1b42ef052391ccf09e54aa40b0a93f532117359974
MD5 bea3739272d422388f447a9f5b1ce4bb
BLAKE2b-256 bf36792663340a7d32d24786c5e3778bc8b9987f03e5a165e0da754bff150636

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page