From e4204865c4a0b87939641a3afa103c74098fcb12 Mon Sep 17 00:00:00 2001 From: Rishabh Bhargava Date: Thu, 30 Apr 2026 12:18:53 -0700 Subject: [PATCH] docs(tts): add language to WS endpoint, simplify locale wording ENG-87042 - Adds `language` as a query parameter on `/audio/speech/websocket` alongside `model`, `voice`, and `max_partial_length`, with the same locale-aware description used on `/audio/speech`. - Drops the redundant ", not `zh-HK`" negative example from the `AudioSpeechRequest.language` description. --- openapi.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 74a00a6..d446f7c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3863,7 +3863,7 @@ paths: **Connection Setup:** - Protocol: WebSocket (wss://) - Authentication: Pass API key as Bearer token in Authorization header - - Parameters: Sent as query parameters (model, voice, max_partial_length) + - Parameters: Sent as query parameters (model, voice, max_partial_length, language) **Client Events:** - `tts_session.updated`: Update session parameters like voice @@ -4145,6 +4145,15 @@ paths: description: | Maximum number of characters in partial text before forcing TTS generation even without a sentence ending. Helps reduce latency for long text without punctuation. + - in: query + name: language + required: false + schema: + type: string + default: en + example: en + description: | + Language or locale of input text. Accepts ISO 639-1 language codes (e.g., `en`, `fr`, `es`, `zh`) as well as locale codes for region-specific variants. Locale codes must be lowercase (e.g., `zh-hk` for Cantonese). Can also be set via `tts_session.updated` event. responses: '101': description: | @@ -10089,7 +10098,7 @@ components: language: type: string description: | - Language or locale of input text. Accepts ISO 639-1 language codes (e.g., `en`, `fr`, `es`, `zh`) as well as locale codes for region-specific variants. Locale codes must be lowercase (e.g., `zh-hk` for Cantonese, not `zh-HK`). + Language or locale of input text. Accepts ISO 639-1 language codes (e.g., `en`, `fr`, `es`, `zh`) as well as locale codes for region-specific variants. Locale codes must be lowercase (e.g., `zh-hk` for Cantonese). default: en example: en response_encoding: