diff --git a/fern/apis/waves/openapi/get-voices-openapi.yaml b/fern/apis/waves/openapi/get-voices-openapi.yaml index 1dda2b22..a4f74a9a 100644 --- a/fern/apis/waves/openapi/get-voices-openapi.yaml +++ b/fern/apis/waves/openapi/get-voices-openapi.yaml @@ -159,6 +159,26 @@ paths: age: middle aged emotions: [] usecases: ["conversational", "narration"] + - voiceId: sanne + displayName: Sanne + tags: + language: ["english", "spanish", "french", "german", "italian", "dutch", "swedish", "portuguese", "polish", "russian", "greek", "finnish", "norwegian"] + accent: dutch + gender: female + age: young + emotions: [] + usecases: ["conversational"] + recommendedLanguages: ["dutch"] + - voiceId: astrid + displayName: Astrid + tags: + language: ["english", "spanish", "french", "german", "italian", "dutch", "swedish", "portuguese", "polish", "russian", "greek", "finnish", "norwegian"] + accent: swedish + gender: female + age: young + emotions: [] + usecases: ["conversational"] + recommendedLanguages: ["swedish"] '400': description: Bad request. The most common cause is a `{model}` value outside the enum. Use `lightning-v3.1` or `lightning-v3.1-pro`. content: diff --git a/fern/products/waves/pages/text-to-speech/get-voice-models-langs.mdx b/fern/products/waves/pages/text-to-speech/get-voice-models-langs.mdx index 388439b8..d5501315 100644 --- a/fern/products/waves/pages/text-to-speech/get-voice-models-langs.mdx +++ b/fern/products/waves/pages/text-to-speech/get-voice-models-langs.mdx @@ -92,7 +92,7 @@ Pair each voice with its language code, e.g. `"language": "ta"` with a Tamil voi - + | Language | Code | Female voices | Male voices | |---|---|---|---| @@ -100,6 +100,8 @@ Pair each voice with its language code, e.g. `"language": "ta"` with a Tamil voi | Spanish | `es` | `martina`, `ines`, `paula` | `sebastian`, `mateo`, `gabriel` | | French | `fr` | `manon`, `juliette`, `lucie`, `elise`, `amelie` | `louis`, `nicolas`, `maxime`, `raphael` | | Italian | `it` | `silvia`, `concetta`, `arianna` | `davide`, `luca`, `leonardo` | +| Dutch | `nl` | `sanne`, `femke`, `fenna` | `daan`, `lars`, `bram`, `stijn` | +| Swedish | `sv` | `astrid`, `ebba`, `saga`, `alva` | `erik`, `anton`, `nils` | | Portuguese (Brazilian) | `pt` | `juliana`, `leticia` | `gustavo`, `thiago`, `bruno` | | Portuguese (European) | `pt` | `catarina` | `francisco` | | Russian | `ru` | `anastasia`, `ekaterina`, `olga`, `irina` | `andrei`, `nikolai`, `maksim` | @@ -218,56 +220,69 @@ See the [Pro model card voice catalog](/models/model-cards/text-to-speech/lightn ## Fetch the full catalog programmatically -For filtering by language / accent / gender / use case across the full 217 voices, query the live catalog. The response includes both standard Lightning v3.1 voices and Pro voices, distinguished by their tags. +The endpoint is **pool-scoped**: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices, `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices. Call one or both depending on which pool you plan to use. + + +**Hyphen vs underscore.** The path uses hyphens (`lightning-v3.1`, `lightning-v3.1-pro`); the `POST /waves/v1/tts` body uses underscores (`lightning_v3.1`, `lightning_v3.1_pro`). Passing the underscored form on the path returns 404. + ```bash cURL +# Standard pool curl "https://api.smallest.ai/waves/v1/lightning-v3.1/get_voices" \ -H "Authorization: Bearer $SMALLEST_API_KEY" + +# Pro pool +curl "https://api.smallest.ai/waves/v1/lightning-v3.1-pro/get_voices" \ + -H "Authorization: Bearer $SMALLEST_API_KEY" ``` ```python Python import os import requests -response = requests.get( - "https://api.smallest.ai/waves/v1/lightning-v3.1/get_voices", - headers={"Authorization": f"Bearer {os.environ['SMALLEST_API_KEY']}"}, -) -response.raise_for_status() -voices = response.json()["voices"] +def fetch_voices(pool: str): + response = requests.get( + f"https://api.smallest.ai/waves/v1/{pool}/get_voices", + headers={"Authorization": f"Bearer {os.environ['SMALLEST_API_KEY']}"}, + ) + response.raise_for_status() + return response.json()["voices"] -# Filter by language -english_voices = [v for v in voices if "english" in v["tags"]["language"]] -print(f"{len(english_voices)} English voices") +standard = fetch_voices("lightning-v3.1") +pro = fetch_voices("lightning-v3.1-pro") -# Filter by accent -indian_voices = [v for v in voices if v["tags"].get("accent") == "indian"] -print(f"{len(indian_voices)} Indian-accent voices") +# Filter by language (works on either pool) +english_pro = [v for v in pro if "english" in v["tags"]["language"]] +print(f"{len(english_pro)} English voices in the Pro pool") -# Filter by gender -female_voices = [v for v in voices if v["tags"].get("gender") == "female"] -print(f"{len(female_voices)} female voices") +# Filter by accent +indian_pro = [v for v in pro if v["tags"].get("accent") == "indian"] +print(f"{len(indian_pro)} Indian-accent Pro voices") -# Use a voice -voice_id = english_voices[0]["voiceId"] # e.g. "kaitlyn" -print(f"Selected: {voice_id}") +# Dedicated per-language voices carry `recommendedLanguages` +dutch = [v for v in pro if "dutch" in v["tags"].get("recommendedLanguages", [])] +print(f"{len(dutch)} Pro voices dedicated to Dutch: {[v['voiceId'] for v in dutch]}") ``` ```javascript JavaScript -const response = await fetch( - "https://api.smallest.ai/waves/v1/lightning-v3.1/get_voices", - { headers: { Authorization: `Bearer ${process.env.SMALLEST_API_KEY}` } } -); -if (!response.ok) throw new Error(`HTTP ${response.status}`); -const { voices } = await response.json(); - -const english = voices.filter((v) => v.tags.language.includes("english")); -const indian = voices.filter((v) => v.tags.accent === "indian"); -const female = voices.filter((v) => v.tags.gender === "female"); - -console.log(`${english.length} English, ${indian.length} Indian-accent, ${female.length} female`); +async function fetchVoices(pool) { + const response = await fetch( + `https://api.smallest.ai/waves/v1/${pool}/get_voices`, + { headers: { Authorization: `Bearer ${process.env.SMALLEST_API_KEY}` } } + ); + if (!response.ok) throw new Error(`HTTP ${response.status}`); + return (await response.json()).voices; +} + +const standard = await fetchVoices("lightning-v3.1"); +const pro = await fetchVoices("lightning-v3.1-pro"); + +const englishPro = pro.filter((v) => v.tags.language.includes("english")); +const dutch = pro.filter((v) => (v.tags.recommendedLanguages || []).includes("dutch")); + +console.log(`${englishPro.length} English Pro voices, ${dutch.length} dedicated Dutch Pro voices`); ``` @@ -320,7 +335,7 @@ Each entry in the `voices` array has: | Turkish | `tr` | - | 2 | | Vietnamese | `vi` | - | 1 | -For per-language voice counts that always reflect the live catalog, query `GET /waves/v1/lightning-v3.1/get_voices` and group by `tags.language`. For the canonical per-voice metadata, see the [Lightning v3.1 model card voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1#voice-catalog) and [Lightning v3.1 Pro voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1-pro#voice-catalog). +For per-language voice counts that always reflect the live catalog, query both `GET /waves/v1/lightning-v3.1/get_voices` and `GET /waves/v1/lightning-v3.1-pro/get_voices`, then group by `tags.language`. For the canonical per-voice metadata, see the [Lightning v3.1 model card voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1#voice-catalog) and [Lightning v3.1 Pro voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1-pro#voice-catalog). ## Need help? diff --git a/fern/products/waves/pages/text-to-speech/model-cards/lightning-v-3-1-pro.mdx b/fern/products/waves/pages/text-to-speech/model-cards/lightning-v-3-1-pro.mdx index ed21ab45..f0d425b6 100644 --- a/fern/products/waves/pages/text-to-speech/model-cards/lightning-v-3-1-pro.mdx +++ b/fern/products/waves/pages/text-to-speech/model-cards/lightning-v-3-1-pro.mdx @@ -229,8 +229,8 @@ Pass the `language` body parameter to steer the Pro pool's output: | Spanish | `es` | 6 | | French | `fr` | 9 | | Italian | `it` | 6 | -| Dutch | `nl` | - | -| Swedish | `sv` | - | +| Dutch | `nl` | 7 | +| Swedish | `sv` | 7 | | Portuguese (Brazilian + European) | `pt` | 7 | | Russian | `ru` | 7 | | Greek | `el` | 5 | @@ -238,8 +238,6 @@ Pass the `language` body parameter to steer the Pro pool's output: | Norwegian | `no` | 4 | | Polish | `pl` | 4 | -Dutch and Swedish accept the codes on Pro; voice-count data pending as new Pro voice trains for those roll out. - For other languages, use the standard [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) model (20 accepted codes; 12 with a trained voice catalog). --- @@ -350,7 +348,7 @@ Pair each voice with its matching `language` code (e.g. `"language": "ta"` with | Turkish | `tr` | - | `beau`, `wes` | | Vietnamese | `vi` | - | `kai` | -### European Languages - 61 voices +### European Languages - 75 voices | Language | Code | Female voices | Male voices | |---|---|---|---| @@ -358,6 +356,8 @@ Pair each voice with its matching `language` code (e.g. `"language": "ta"` with | Spanish | `es` | `martina`, `ines`, `paula` | `sebastian`, `mateo`, `gabriel` | | French | `fr` | `manon`, `juliette`, `lucie`, `elise`, `amelie` | `louis`, `nicolas`, `maxime`, `raphael` | | Italian | `it` | `silvia`, `concetta`, `arianna` | `davide`, `luca`, `leonardo` | +| Dutch | `nl` | `sanne`, `femke`, `fenna` | `daan`, `lars`, `bram`, `stijn` | +| Swedish | `sv` | `astrid`, `ebba`, `saga`, `alva` | `erik`, `anton`, `nils` | | Portuguese (Brazilian) | `pt` | `juliana`, `leticia` | `gustavo`, `thiago`, `bruno` | | Portuguese (European) | `pt` | `catarina` | `francisco` | | Russian | `ru` | `anastasia`, `ekaterina`, `olga`, `irina` | `andrei`, `nikolai`, `maksim` | diff --git a/fern/products/waves/pages/text-to-speech/overview.mdx b/fern/products/waves/pages/text-to-speech/overview.mdx index 1424d8d6..33303635 100644 --- a/fern/products/waves/pages/text-to-speech/overview.mdx +++ b/fern/products/waves/pages/text-to-speech/overview.mdx @@ -86,195 +86,44 @@ Choose the synthesis mode that best fits your application's needs: ## Supported Languages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LanguageCodeLightning v3.1Lightning v3.1 Pro
EnglishenYesYes
HindihiYesYes (Indian voices)
TamiltaYesYes
KannadaknYesYes
MalayalammlYesYes
TeluguteYesYes
GujaratiguYesYes
MarathimrYesYes
BengalibnYesYes
PunjabipaYesYes
OdiaorYesYes
SpanishesYesYes
Germande-Yes
Frenchfr-Yes
Italianit-Yes
Portuguesept-Yes
Russianru-Yes
Greekel-Yes
Finnishfi-Yes
Norwegianno-Yes
Polishpl-Yes
Arabicar-Yes
Chinese (Mandarin)zh-Yes
Indonesianid-Yes
Japaneseja-Yes
Koreanko-Yes
Malayms-Yes
Turkishtr-Yes
Vietnamesevi-Yes
+| Language | Code | Lightning v3.1 | Lightning v3.1 Pro | +|---|---|---|---| +| English | `en` | Yes | Yes | +| Hindi | `hi` | Yes | Yes (Indian voices) | +| Marathi | `mr` | Yes | Yes | +| Bengali | `bn` | Yes | Yes | +| Gujarati | `gu` | Yes | Yes | +| Kannada | `kn` | Yes | Yes | +| Malayalam | `ml` | Yes | Yes | +| Odia | `or` | Yes | Yes | +| Punjabi | `pa` | Yes | Yes | +| Tamil | `ta` | Yes | Yes | +| Telugu | `te` | Yes | Yes | +| Spanish | `es` | Yes | Yes | +| German | `de` | Yes | Yes | +| French | `fr` | Yes | Yes | +| Italian | `it` | Yes | Yes | +| Dutch | `nl` | Yes | Yes | +| Swedish | `sv` | Yes | Yes | +| Portuguese | `pt` | Yes | Yes | +| Polish | `pl` | Yes | Yes | +| Russian | `ru` | Yes | Yes | +| Greek | `el` | - | Yes | +| Finnish | `fi` | - | Yes | +| Norwegian | `no` | - | Yes | +| Arabic | `ar` | - | Yes | +| Chinese (Mandarin) | `zh` | - | Yes | +| Indonesian | `id` | - | Yes | +| Japanese | `ja` | - | Yes | +| Korean | `ko` | - | Yes | +| Malay | `ms` | - | Yes | +| Turkish | `tr` | - | Yes | +| Vietnamese | `vi` | - | Yes | + +Standard Lightning v3.1 accepts 20 language codes (10 European, 10 Indic). Pro adds 11 more (Greek, Finnish, Norwegian + 8 Asian & Middle Eastern). -**Pro language support is per voice.** Indian Pro voices (e.g., `meher`, `rhea`, `aviraj`) speak English with native Hindi code-switching. British and American Pro voices speak English only. Each additional Pro language has its own dedicated voices - pass the matching ISO 639-1 `language` code with a voice from that language (see the [Pro voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1-pro#voice-catalog)). For languages without Pro voices, use standard Lightning v3.1. +**Pro language support is per voice.** Each additional Pro language has its own dedicated voices. Pair a voice with the matching ISO 639-1 `language` code, or use `auto` to route across all supported languages using any English or Hindi voice. See the [Pro voice catalog](/models/model-cards/text-to-speech/lightning-v-3-1-pro#voice-catalog) for the per-language voice list.