feat(speech-generation): add Gradium TTS provider with WebSocket API#89
feat(speech-generation): add Gradium TTS provider with WebSocket API#89Kamilbenkirane merged 5 commits intomainfrom
Conversation
Add comprehensive Gradium text-to-speech integration with WebSocket streaming support. Features: - WebSocket-based TTS streaming with low-latency audio generation - 14 flagship voices across 5 languages (en, fr, de, es, pt) - Custom voice cloning with create/list/update/delete operations - Speed control via padding_bonus parameter (-4.0 to 4.0) - Multiple audio formats (wav, pcm, opus, ulaw_8000, alaw_8000, pcm_16000, pcm_24000) - EU/US regional endpoints for optimized latency - Credits monitoring and usage tracking Implementation details: - WebSocket protocol handling with proper message sequencing - Parameter mappers for voice, speed, and response_format - Pydantic models for API responses (VoiceInfo, CreditsSummary, TTSResult) - Full voice management REST API integration - Comprehensive test suite with 6 test functions Dependencies: - Added websockets>=13.0 to support WebSocket connections Documentation: - Complete README with usage examples and API reference - Test scripts for validation (test_gradium_tts.py, test_gradium_minimal.py)
Add Gradium as a new speech generation provider using their WebSocket-based Text-to-Speech API. This provider enables high-quality multilingual speech synthesis with 14 flagship voices across 5 languages. Key changes: - Add celeste-gradium provider package with WebSocket TTS client - Add Gradium capability provider with parameter mappers - Add WebSocket client module to celeste core - Add 14 flagship voices (EN, FR, DE, ES, PT) - Add Gradium integration test and CI secrets - Bump celeste-ai and celeste-speech-generation to 0.3.1 Provider features: - WebSocket streaming for low-latency audio generation - Support for wav, pcm, opus output formats - Voice selection by name (Emma, Kent, Sydney, etc.) - Speed control via padding_bonus translation
- Export GRADIUM_VOICES in speech-generation __init__.py - Add DEFAULT_VOICE_ID to config.py (consistent with ElevenLabs) - Add _make_request stub to satisfy abstract interface - Remove unused httpx import from capability client
PR Review: Add Gradium TTS Provider with WebSocket APISummaryThis PR adds Gradium as a new speech generation provider with WebSocket-based TTS. The implementation is well-structured and follows existing patterns in the codebase. Overall, this is a solid addition with good architectural decisions. ✅ StrengthsCode Quality & Architecture
WebSocket Implementation
Documentation
|
Summary
Changes
New Provider Package (
packages/providers/gradium/)Capability Integration (
packages/capabilities/speech-generation/)GradiumTextToSpeechClientandSpeechGenerationClientgradium-tts-v1andgradium-tts-v1-turboCore Updates
Provider.GRADIUMenum valueCapability.SPEECH_GENERATIONto GradiumGRADIUM_API_KEYcredential supportsrc/celeste/websocket.py)Test plan