Get voices by language
curl https://texttospeech.responsivevoice.org/v2/voices/by-language/en-US -H 'X-API-Key: YOUR_API_KEY' -H 'X-API-Secret: YOUR_API_SECRET'import { ResponsiveVoiceAPIClient } from '@responsivevoice/api-client';
const client = new ResponsiveVoiceAPIClient({ apiKey: 'YOUR_API_KEY', apiSecret: 'YOUR_API_SECRET' });const { voices } = await client.getVoicesByLanguage('en-US');Returns all voices available for a specific BCP-47 language code (e.g. “en-US”, “pt-BR”, “ja-JP”). Includes both free and premium voices. Each voice includes HATEOAS _links for navigation.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”BCP-47 language code (e.g. “en-US”, “fr-FR”, “zh-CN”). Case-sensitive.
Responses
Section titled “ Responses ”Voices matching the requested language, with count and HATEOAS navigation links. Supports ETag-based conditional requests.
Voices for a specific language with HATEOAS navigation
object
User-facing voice with HATEOAS links
object
HATEOAS links on a voice resource
object
HATEOAS link with absolute URL
object
HATEOAS synthesize action link
object
object
HATEOAS streaming synthesize link (HTTP audio streaming)
object
object
HATEOAS WebSocket stream link
object
object
HATEOAS links on a by-language voice collection
object
HATEOAS link with absolute URL
object
HATEOAS link with absolute URL
object
Example
{ "voices": [ { "gender": "f", "_links": { "synthesize": { "method": "POST" }, "synthesize:stream": { "method": "POST", "accept": "text/event-stream" }, "stream:websocket": { "protocol": "websocket" } } } ]}Headers
Section titled “Headers ”Maximum requests permitted for the authenticated key per minute.
Maximum requests permitted for the authenticated key per minute.
Requests remaining in the current per-minute window; 0 once the per-minute limit is reached. Reflects the per-minute limit, not the burst check — a burst 429 may report a value above 0.
Requests remaining in the current per-minute window; 0 once the per-minute limit is reached. Reflects the per-minute limit, not the burst check — a burst 429 may report a value above 0.
Not modified (ETag match)
API key required
API error response
object
object
Example generated
{ "error": { "message": "example", "code": "example", "statusCode": 1, "errors": "example" }}Rate limit exceeded. The body code is RATE_LIMIT_EXCEEDED (per-minute tier limit) or BURST_RATE_LIMIT_EXCEEDED (per API key + client IP burst).
API error response
object
object
Example generated
{ "error": { "message": "example", "code": "example", "statusCode": 1, "errors": "example" }}Headers
Section titled “Headers ”Maximum requests permitted for the authenticated key per minute.
Maximum requests permitted for the authenticated key per minute.
Requests remaining in the current per-minute window; 0 once the per-minute limit is reached. Reflects the per-minute limit, not the burst check — a burst 429 may report a value above 0.
Requests remaining in the current per-minute window; 0 once the per-minute limit is reached. Reflects the per-minute limit, not the burst check — a burst 429 may report a value above 0.
Seconds to wait before retrying. Dynamic — varies with how far over the limit the request went; honor this header rather than assuming a fixed delay.
Seconds to wait before retrying. Dynamic — varies with how far over the limit the request went; honor this header rather than assuming a fixed delay.