TTS Research: Alternatives and Commercial Licensing Analysis for Gromozeka
Research Context
Investigation of TTS options for Gromozeka desktop application focusing on:
- Commercial licensing compatibility (for potential product sales)
- Russian language support quality
- Performance and latency requirements
- Integration complexity with Kotlin/JVM
- Cost analysis for desktop chat application usage
Current Implementation Analysis
Existing TTS Setup (Spring AI + OpenAI)
Location: bot/src/jvmMain/kotlin/com/gromozeka/bot/services/TtsService.kt
Current Configuration:
- Model: gpt-4o-mini-tts (cost-optimized choice)
- Cost: /bin/zsh.60/1M characters (25x cheaper than tts-1)
- Voice: OpenAI Alloy voice, MP3 format, 1.0x speed
- Integration: Well-integrated with chat streaming, TTS queue management, cancellation support
- Playback: macOS afplay command
- Monthly cost: < USD for typical usage patterns
Architecture Strengths:
- Proper queue management with cancellation (TTSQueueService.kt)
- Integration with streaming chat responses
- JSON-structured responses from Claude for TTS text extraction
- Already working and stable
Commercial Licensing Analysis
NOT Commercial Friendly:
-
macOS native TTS (say command)
- Apple''s license restricts System Voices to personal, non-commercial use only
- Excellent Russian voice Milena available
- Simple integration: say -v Milena текст
- Use case: Development/prototyping only
-
Piper TTS
- License changed: MIT → GPL-3.0 (viral license)
- Repository moved: rhasspy/piper → github.com/OHF-Voice/piper1-gpl
- Requires entire application to be open source if used
- Performance: 20-30ms generation (excellent)
- Quality: Google TTS level, superior Russian support
-
eSpeak-NG
- GPL v3+ license (viral)
- Russian phonemes available but robotic quality
- brew install espeak-ng
Commercial Friendly:
-
Festival TTS (Only viable open-source option)
- License: BSD-like (allows commercial use)
- Cost: Free
- Quality: Basic/robotic sound
- Russian support: festvox-ru package available
- Installation: brew install festival + Russian voice package from festvox.org
- Use case: Offline fallback option
-
Google Cloud TTS (Recommended cloud option)
- Free tier: 1M WaveNet characters/month + 4M Standard characters/month
- Pricing after free tier: /1M WaveNet, /1M Standard
- Quality: Excellent Russian neural voices (multiple options)
- Latency: Moderate (API calls)
- Integration: Java SDK with Kotlin compatibility
-
Azure TTS
- Free tier: 500K characters/month
- Pricing: Similar to Google (~/1M neural voices)
- Russian voices: SvetlanaNeural and others
- Quality: Very good
-
Amazon Polly
- Pricing: .20/1M standard, .80/1M neural
- Russian support: Available
- Quality: Good
Performance Comparison
Latency Analysis:
- Piper TTS: 20-30ms (100x faster, but GPL licensing issue)
- Current OpenAI: 1-3 seconds + network latency
- Cloud TTS services: 1-2 seconds typical
- macOS native: Very fast (~200ms, but non-commercial)
- Festival TTS: Fast local processing (~500ms)
Russian Language Quality Ranking:
- Google Cloud TTS: Best neural voices for Russian
- macOS Milena voice: Excellent but non-commercial
- Piper TTS: Very good Russian support (but GPL)
- Azure TTS: Good Russian neural voices
- Current OpenAI: Decent, optimized for English
- Amazon Polly: Adequate Russian support
- Festival TTS: Basic quality, robotic sound
- eSpeak-NG: Robotic, basic phonemes
Implementation Recommendations
Phase 1: Current State (Keep as-is)
- Rationale: OpenAI gpt-4o-mini-tts is already optimal for cost/quality balance
- Action: No changes needed, current implementation is excellent
Phase 2: Quality Enhancement (Optional)
- Primary: Add Google Cloud TTS integration for better Russian voices
- Implementation: Use 1M free characters/month, fallback to OpenAI
- Benefits: Superior Russian voice quality + cost optimization
Phase 3: Offline Capability (Future)
- Add: Festival TTS as offline fallback option
- Trade-off: Basic quality but no internet dependency
- Use case: Privacy-focused users or network issues
Key Insights
- Current choice validated: OpenAI gpt-4o-mini-tts is actually the most cost-effective option in 2025
- GPL license trap: Many promising open-source TTS engines became GPL, making them unsuitable for commercial products
- Google Cloud opportunity: 1M free characters/month provides significant value for experimentation
- Hybrid approach optimal: Combine cloud quality with offline fallback options
Action Items for Implementation
🤖 Generated with Claude Code
TTS Research: Alternatives and Commercial Licensing Analysis for Gromozeka
Research Context
Investigation of TTS options for Gromozeka desktop application focusing on:
Current Implementation Analysis
Existing TTS Setup (Spring AI + OpenAI)
Location: bot/src/jvmMain/kotlin/com/gromozeka/bot/services/TtsService.kt
Current Configuration:
Architecture Strengths:
Commercial Licensing Analysis
NOT Commercial Friendly:
macOS native TTS (say command)
Piper TTS
eSpeak-NG
Commercial Friendly:
Festival TTS (Only viable open-source option)
Google Cloud TTS (Recommended cloud option)
Azure TTS
Amazon Polly
Performance Comparison
Latency Analysis:
Russian Language Quality Ranking:
Implementation Recommendations
Phase 1: Current State (Keep as-is)
Phase 2: Quality Enhancement (Optional)
Phase 3: Offline Capability (Future)
Key Insights
Action Items for Implementation
🤖 Generated with Claude Code