feat: Add speech-generation package#56
Conversation
…bs providers - Add complete speech-generation package with unified interface - Support for OpenAI TTS-1, Google Cloud TTS, and ElevenLabs models - Implement streaming support for ElevenLabs - Add voice constraints with name/ID mapping - Fix input content extraction pattern across all generation capabilities - Update root pyproject.toml: bump version to 0.2.13, add speech-generation to optional-dependencies - Add ELEVENLABS_API_KEY to GitHub workflows - Update CI/CD: add speech-generation to mypy checks, exclude conftest files - All tests passing, CI checks green Breaking changes: None (new package)
Pull Request Review: Speech Generation PackageOverviewThis is a well-structured PR that adds speech generation capability to Celeste AI with support for OpenAI, Google Cloud TTS, and ElevenLabs providers. The implementation follows the existing patterns in the codebase and maintains consistency with other capability packages. ✅ Strengths1. Architecture & Design
2. Code Quality
3. Testing
🔍 Issues & Concerns1. Critical: Inconsistent Input Pattern ✅The 2. Potential Bug: ElevenLabs Voice ID Handling
|
- Remove 8 legacy voices: Rachel, Antoni, Elli, Josh, Arnold, Serena, Sam, Domi - Keep Adam (replacement for Antoni/Arnold) and Bella (not being replaced) - Add Laura (replaces Domi) with confirmed ID: FGY2WhTYpPnrIDTdsKH5 - Add TODO comments for Janet, Peter, Craig, Riley (not yet available in API) - Update tests to use Laura instead of Rachel Breaking change: Users must migrate from legacy voices before ElevenLabs deprecation on Feb 28, 2026.
- Move conftest.py from tests/ to tests/integration_tests/ - Matches structure used in other packages (text-generation, image-generation, video-generation) - Removes need for --exclude '.*conftest\.py' in mypy commands
- Add change detection to publish.yml to only run integration tests for changed packages - Use matrix strategy for parallel integration test execution - Add ELEVENLABS_API_KEY to integration test environment - Remove --exclude '.*conftest\.py' from mypy commands (no longer needed) - Update Makefile typecheck command to match CI workflow
Code Review: PR #56 - Speech Generation PackageExecutive SummaryOverall Assessment: ✅ APPROVE with Minor Recommendations This PR adds a well-architected speech-generation capability following established patterns. The implementation demonstrates solid engineering practices with type safety, proper abstractions, and consistent patterns across providers. No critical or high-priority issues found - the code is production-ready. Key Strengths:
Issues FoundMedium Priority (Consider Fixing)1. OpenAI Client - Response Format Default
2. ElevenLabs Client - Private Method Access
3. Streaming Tests - Missing Finalization Test
Low Priority (Nice to Have)
Security Review✅ No security concerns found
Performance Review✅ No performance issues
Test Coverage: Good (84.55%)What's Tested:
What Could Be Added:
Specific PR Items Review✅ "Fixed input content extraction pattern (explicit kwargs)"Status: VERIFIED - The explicit kwarg pattern is correctly applied and prevents text from being consumed by **parameters. Consistent with image/text generation packages. ✅ Binary Response HandlingStatus: EXCELLENT - Both OpenAI and ElevenLabs cleanly override ✅ Streaming ImplementationStatus: GOOD - ElevenLabs streaming properly wraps binary chunks with clean async context management. ✅ Voice ConstraintsStatus: EXCELLENT - VoiceConstraint class accepts both IDs and names with clear error messages. Highlights1. Excellent Documentation in Code 2. Clean Binary Response Pattern 3. Voice Constraint Design Final Verdict✅ APPROVE - Ready to Merge This is high-quality, production-ready code. All identified issues are minor enhancements that can be addressed in follow-up PRs if desired. Confidence Level: High | Risk Level: Low | Code Quality: Excellent Great work on this implementation! 🚀 Review generated with comprehensive analysis of 2089 additions across 43 files |
🎯 Overview
Adds the speech-generation capability package with support for OpenAI, Google Cloud TTS, and ElevenLabs providers.
✨ Features
🔧 Technical Changes
celeste-speech-generation(v0.2.8)celeste-ai(v0.2.12 → v0.2.13)✅ Testing
📦 Installation
uv add "celeste-ai[speech-generation]"🚀 Usage
📋 Checklist