Skip to content

feat(smallestai): update TTS plugin for Lightning v3.1 Pro and unified endpoint#5799

Open
harshitajain165 wants to merge 6 commits into
livekit:mainfrom
harshitajain165:feat/smallest-tts-lightning-v3-1-pro
Open

feat(smallestai): update TTS plugin for Lightning v3.1 Pro and unified endpoint#5799
harshitajain165 wants to merge 6 commits into
livekit:mainfrom
harshitajain165:feat/smallest-tts-lightning-v3-1-pro

Conversation

@harshitajain165
Copy link
Copy Markdown
Contributor

@harshitajain165 harshitajain165 commented May 21, 2026

Summary

  • Adds lightning_v3.1_pro as a supported TTS model β€” Smallest AI's new premium 44.1 kHz pool with curated American, British, and Indian voices
  • Removes deprecated lightning-v2 and its exclusive parameters (consistency, similarity, enhancement)
  • Migrates from the per-model endpoint (/{model}/get_speech) to the new unified /tts endpoint where model is a JSON body parameter
  • Updates model ID notation from hyphens to underscores (lightning-v3.1 β†’ lightning_v3.1) to match the current API spec
  • Updates TTSEncoding: mulaw β†’ ulaw to match new API spec
  • Resolves the default voice_id from the model at construction time: meher for lightning_v3.1_pro, sophia for lightning_v3.1 β€” prevents silent bad output from mismatched voice/model pairings

Test plan

  • lightning_v3.1_pro endpoint verified live against api.smallest.ai/waves/v1/tts (HTTP 200, audio returned)
  • Full voice agent tested end-to-end via console mode with Pulse STT + Lightning v3.1 Pro TTS

…ified endpoint

- Add lightning_v3.1_pro model (premium 44.1 kHz pool, curated voice catalog)
- Rename lightning-v3.1 β†’ lightning_v3.1 to match updated API model ID notation
- Remove lightning-v2 (deprecated) and its exclusive params (consistency, similarity, enhancement)
- Switch TTS endpoint from /{model}/get_speech to unified /tts; model now sent as body param
- Update TTSEncoding: mulaw β†’ ulaw to match new API spec
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment on lines +74 to +76
model: The TTS model to use. Use "lightning_v3.1" (default) for the standard
model with 217 voices across 12 languages, or "lightning_v3.1_pro" for the
premium pool with curated American, British, and Indian voices at 44.1 kHz.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Docstring incorrectly claims "lightning_v3.1" is the default model

The docstring at tts.py:74 states Use "lightning_v3.1" (default) but the actual parameter default at tts.py:61 is "lightning_v3.1_pro". This will mislead users reading the documentation into thinking the standard model is the default, when it's actually the pro model.

Suggested change
model: The TTS model to use. Use "lightning_v3.1" (default) for the standard
model with 217 voices across 12 languages, or "lightning_v3.1_pro" for the
premium pool with curated American, British, and Indian voices at 44.1 kHz.
model: The TTS model to use. Use "lightning_v3.1_pro" (default) for the
premium pool with curated American, British, and Indian voices at 44.1 kHz,
or "lightning_v3.1" for the standard model with 217 voices across 12 languages.
Open in Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

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