Skip to content

docs(tts): migrate core recipes to /waves/v1/tts + Lightning v3.1 Pro#44

Merged
abhishekmishragithub merged 2 commits into
mainfrom
docs/lightning-v3-1-pro-recipe-updates
May 20, 2026
Merged

docs(tts): migrate core recipes to /waves/v1/tts + Lightning v3.1 Pro#44
abhishekmishragithub merged 2 commits into
mainfrom
docs/lightning-v3-1-pro-recipe-updates

Conversation

@abhishekmishragithub

Copy link
Copy Markdown
Collaborator

Summary

Migrates the core TTS recipes to the new unified /waves/v1/tts route and switches the default model to lightning_v3.1_pro (the new Pro pool). Code samples on the docs site (PR smallest-inc/smallest-ai-documentation#146) are updated in lockstep.

Why

  • The TTS API now has a unified, model-agnostic route — POST /waves/v1/tts (sync) and /waves/v1/tts/live (SSE + WebSocket, protocol-dispatched). The legacy model-named routes (/waves/v1/lightning-v3.1/get_speech etc.) still work but are deprecated.
  • Lightning v3.1 Pro launched as a premium pool with a curated voice catalog (American / British / Indian × Male / Female).
  • The model is now picked via the model body field, default lightning_v3.1, or lightning_v3.1_pro for the Pro pool. No URL change needed mid-pipeline.

What changed

Migrated to the unified route + Pro-by-default:

  • text-to-speech/README.md
  • text-to-speech/quickstart-{curl.sh, python.py, javascript.js}
  • text-to-speech/quickstart/{quickstart.py, quickstart.js, README.md}
  • text-to-speech/getting-started/{python, javascript}/synthesize.{py, js}
  • text-to-speech/getting-started/README.md
  • text-to-speech/streaming-python.py
  • text-to-speech/streaming/{python, javascript}/stream_{ws, sse}.{py, js}
  • text-to-speech/streaming/README.md

Each updated recipe carries an inline comment explaining how to switch back to the standard pool (drop the model field or set it to "lightning_v3.1"). Voice ID defaults to meher (top-ranked Indian female Pro voice).

Verified live against the production API

  • quickstart-python.py → 138,284 bytes WAV
  • streaming/python/stream_sse.py → TTFB 716ms, 19 chunks, 138,240 bytes WAV
  • Unified /waves/v1/tts REST sync: 200 OK
  • Unified /waves/v1/tts/live SSE: 200 OK, text/event-stream
  • Unified wss://api.smallest.ai/waves/v1/tts/live WS: 200 OK, TTFB ~236ms

What's NOT in this PR (intentional)

Recipes that depend on features the Pro pool doesn't offer remain on the standard pool — they'll be revisited in a follow-up if/when relevant:

  • voice-cloning/ — Pro doesn't offer voice cloning.
  • multilingual-translator/, language-translation-app/ — need non-en/hi languages that Pro voices aren't trained on.
  • pronunciation-dicts/pronunciation_dicts body field is standard-pool only.

Lower-priority recipes (audiobook-generator, podcast-generator, news-voice-app, voice-gallery-app, voice-explorer, voices/, sdk-usage) would each benefit but were out of scope for this batch.

Dependency / merge sequence

Land smallest-inc/smallest-ai-documentation#146 first so the Pro model card URL referenced from these recipes' READMEs (/waves/model-cards/text-to-speech/lightning-v-3-1-pro) resolves. The recipe code itself works regardless — the API endpoint is already live.

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smallest-showcase Ready Ready Preview, Comment May 20, 2026 7:08pm

Request Review

@entelligence-ai-pr-reviews

entelligence-ai-pr-reviews Bot commented May 20, 2026

Copy link
Copy Markdown

EntelligenceAI PR Summary

Updates documentation for the LANGUAGE environment variable in the text-to-speech getting started README to reflect model-dependent language support.

  • Pro pool model supports en (all voices) or hi (Indian voices)
  • Switching MODEL to lightning_v3.1 enables es, ta, and 9 additional languages

Confidence Score: 5/5 - Safe to Merge

Safe to merge — this PR makes purely documentation updates to the text-to-speech getting started README, accurately reflecting model-dependent language support for the LANGUAGE environment variable. The changes correctly document that the Pro pool model supports en (all voices) and hi (Indian voices), and that switching MODEL to lightning_v3.1 unlocks es, ta, and additional languages. No logic, runtime code, or configuration files are modified, and the review produced zero comments or flagged issues.

Key Findings:

  • The LANGUAGE environment variable documentation update accurately reflects the real API behavior difference between the Pro pool model and lightning_v3.1, preventing user confusion about unsupported language codes.
  • No code changes are introduced — this is a pure documentation/README update with zero runtime, logic, or security impact.
  • The PR summary and changes are internally consistent: the documented language expansions align with the described model migration from Pro pool to lightning_v3.1.
Files requiring special attention
  • README.md

Comment thread text-to-speech/streaming-python.py
…3.1 Pro

The TTS API has a new unified route — POST /waves/v1/tts (sync) and
/waves/v1/tts/live (SSE + WebSocket, protocol-dispatched). The legacy
model-named routes (/waves/v1/lightning-v3.1/get_speech etc.) still work but
are deprecated. New code should pick the model via the `model` body field:
"lightning_v3.1" (default, standard pool, more voices + voice cloning) or
"lightning_v3.1_pro" (premium pool, curated voice catalog).

Migrated to the unified route + Pro-by-default in these recipes:

- text-to-speech/README.md
- text-to-speech/quickstart-{curl.sh,python.py,javascript.js}
- text-to-speech/quickstart/{quickstart.py,quickstart.js,README.md}
- text-to-speech/getting-started/{python,javascript}/synthesize.{py,js}
- text-to-speech/getting-started/README.md
- text-to-speech/streaming-python.py
- text-to-speech/streaming/{python,javascript}/stream_{ws,sse}.{py,js}
- text-to-speech/streaming/README.md

Each updated recipe carries a comment explaining how to switch back to the
standard pool (drop the `model` field or set it to "lightning_v3.1"). Voice
ID defaults to "meher" (top-ranked Indian female Pro voice).

Verified live: quickstart-python.py returned 138 KB WAV; stream_sse.py
TTFB 716ms, 19 chunks, 138 KB WAV.

Recipes that depend on Pro-incompatible features are intentionally left on
the standard pool and will be migrated in a follow-up PR if/when needed:
- voice-cloning/ — Pro doesn't offer voice cloning
- multilingual-translator/, language-translation-app/ — need non-en/hi
  languages that Pro voices aren't trained on
- pronunciation-dicts/ — pronunciation_dicts param is standard-pool only

Lower-priority recipes (audiobook-generator, podcast-generator,
news-voice-app, voice-gallery-app, voice-explorer, voices/, sdk-usage)
to be migrated in a follow-up; they would each benefit but were out of
scope for this batch.
Comment thread text-to-speech/getting-started/README.md Outdated
Bot MAJOR (CORRECTNESS) on PR #44: with MODEL defaulting to
lightning_v3.1_pro, the LANGUAGE table previously listed `es` and `ta`
as valid options. Pro voices only support `en` (all accents) and `hi`
(Indian voices). Sending `es`/`ta` to Pro returns an API error.

Replace the misleading parenthetical with a Pro-vs-Standard-aware
description that points users to MODEL=lightning_v3.1 when they need
the wider 12-language catalog.
@abhishekmishragithub abhishekmishragithub merged commit 30c854c into main May 20, 2026
3 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