Skip to content

feat: add missing ElevenLabs models and voices#59

Merged
Kamilbenkirane merged 1 commit into
mainfrom
feat/add-elevenlabs-models-and-voices
Dec 5, 2025
Merged

feat: add missing ElevenLabs models and voices#59
Kamilbenkirane merged 1 commit into
mainfrom
feat/add-elevenlabs-models-and-voices

Conversation

@Kamilbenkirane

Copy link
Copy Markdown
Member

Changes

New Models

Added four missing ElevenLabs models:

  • eleven_v3 - Eleven v3 model
  • eleven_turbo_v2_5 - Eleven Turbo v2.5 model
  • eleven_flash_v2 - Eleven Flash v2 model
  • eleven_multilingual_v1 - Eleven Multilingual v1 model

All models support:

  • Voice selection from available voices
  • Speed control (0.7-1.2)
  • Multiple response formats (mp3_44100_128, pcm_22050_16, pcm_24000_16, pcm_44100_16)
  • Streaming support

New Voice

  • Added Spuds voice (Grandpa Spuds Oxley) - ID: NOpBlnGInO9m6vDvFkFC

Version Bumps

  • celeste-speech-generation: 0.2.8 → 0.2.9
  • celeste-ai: 0.2.13 → 0.2.14
  • Updated dependency requirements in root pyproject.toml

Testing

  • All models follow the same parameter constraints pattern as existing ElevenLabs models
  • Voice constraint updated to include new Spuds voice

- Add four new ElevenLabs models:
  - eleven_v3
  - eleven_turbo_v2_5
  - eleven_flash_v2
  - eleven_multilingual_v1
- Add Spuds voice (Grandpa Spuds Oxley)
- Bump speech-generation version to 0.2.9
- Bump celeste-ai version to 0.2.14
@claude

claude Bot commented Dec 5, 2025

Copy link
Copy Markdown

Code Review: PR #59 - Add missing ElevenLabs models and voices

Summary

This PR adds four new ElevenLabs speech generation models and one new voice. The changes are clean, well-structured, and follow existing patterns in the codebase.

✅ Code Quality & Best Practices

Excellent:

  • ✅ Consistent code structure - all new models follow the exact same pattern as existing models
  • ✅ Proper typing and structure with Model, VoiceConstraint, Range, and Choice
  • ✅ Clear, descriptive display names
  • ✅ Appropriate version bumping (minor version increments)
  • ✅ Good inline documentation for the new voice
  • ✅ Clean, readable code with proper formatting

Observations:

  • The models have significant code duplication (all 4 new models + existing ones share identical parameter constraints). This is acceptable given the declarative nature of the configuration, but consider extracting common constraints if this list grows significantly larger.

🔍 Potential Issues

Model Order (Minor)

The models list is not in a clear ordering pattern. Consider organizing by:

  • Version (newest to oldest), OR
  • Alphabetically, OR
  • By use case (turbo vs multilingual vs flash vs standard)

Current order appears somewhat mixed. For maintainability, I'd suggest ordering newest to oldest within each model family:

eleven_v3
eleven_turbo_v2_5
eleven_turbo_v2
eleven_flash_v2_5
eleven_flash_v2
eleven_multilingual_v2
eleven_multilingual_v1
eleven_monolingual_v1

This helps developers quickly find the latest models to use.

Verify Model IDs

Ensure that model IDs match ElevenLabs' official documentation:

  • eleven_v3
  • eleven_turbo_v2_5
  • ⚠️ eleven_flash_v2 - Please verify this exists (I see eleven_flash_v2_5 already in the codebase)
  • eleven_multilingual_v1

These should be confirmed against the ElevenLabs API documentation.

Voice ID Verification

  • ⚠️ Voice ID NOpBlnGInO9m6vDvFkFC for "Spuds" - please confirm this is correct from the ElevenLabs API, as voice IDs must be exact

⚡ Performance Considerations

No concerns:

  • These are declarative configuration additions with no runtime performance impact
  • All models support streaming, which is good for performance
  • Speed constraints (0.7-1.2) are reasonable and consistent

🔒 Security Concerns

No security issues identified:

  • No user input handling
  • No API key exposure
  • Configuration-only changes
  • Proper constraint validation in place

🧪 Test Coverage

Needs attention:

The existing test file packages/speech-generation/tests/integration_tests/test_speech_generation/test_generate.py:19 currently tests eleven_flash_v2_5.

Recommendations:

  1. Add parametrized tests for the new models to ensure they work correctly:

    • eleven_v3
    • eleven_turbo_v2_5
    • eleven_flash_v2
    • eleven_multilingual_v1
  2. Test the new voice - add a test case using the "Spuds" voice to verify it works

  3. Consider adding a model registry test that validates:

    • All models have unique IDs
    • All models have required parameter constraints
    • Model IDs match expected patterns

Example test to add:

@pytest.mark.parametrize(
    ("model", "voice"),
    [
        ("eleven_v3", "Spuds"),
        ("eleven_turbo_v2_5", "Laura"),
        ("eleven_flash_v2", "Adam"),
        ("eleven_multilingual_v1", "Bella"),
    ],
)
@pytest.mark.integration
@pytest.mark.asyncio
async def test_new_elevenlabs_models(model: str, voice: str) -> None:
    """Test newly added ElevenLabs models."""
    # ... test implementation

📋 Additional Recommendations

  1. Documentation: Consider updating the README or docs to mention the new models if they have specific use cases (e.g., "Use eleven_v3 for highest quality", "Use eleven_flash_v2 for lowest latency")

  2. Deprecation: If any older models should be deprecated in favor of these new ones, add deprecation warnings

  3. Changelog: Ensure the changes are documented in a CHANGELOG.md if the project maintains one

Verdict

Recommendation: Approve with minor suggestions

The code is solid and follows best practices. The main action items are:

  1. ✅ Verify model IDs against ElevenLabs API docs
  2. ✅ Verify the Spuds voice ID
  3. 🧪 Add test coverage for new models
  4. 📝 Consider reordering models for better maintainability

Great work on maintaining consistency with the existing codebase! 🎉


Review generated by Claude Code

@Kamilbenkirane Kamilbenkirane merged commit dd9596c into main Dec 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant