Repository navigation
feat(xai): wire the 26-voice Grok catalog into both SDKs - #218
Merged
Merged
Conversation
Typed immutable voice roster (XAI_VOICES / XAI_VOICE_IDS / XAI_DEFAULT_VOICE) with case-insensitive builtin lookup and trim+lowercase normalization applied before the voice reaches xAI (REST voice_id, session.update voice). Custom cloned voice_ids stay opaque and are never rejected. Adds providers.xai() / xaiAsr() (TS) and xai() / xai_asr() (Python) config helpers, resolves the xai_tts / xai keys in the Python TTSConfig/STTConfig factories, lists xAI in the patter init STT/TTS tables, and points the xai-tts docs at the catalog. TS: tsc clean, 2616 tests; Python: 3016 tests.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The xAI (Grok) STT / TTS / Realtime providers shipped in #211, but the 26-voice roster lived only in docs prose. This PR wires it into both SDKs.
XAI_VOICES/XAI_VOICE_IDS/XAI_DEFAULT_VOICEplusisXaiBuiltinVoice/normalizeXaiVoice/getXaiVoice(TS) andis_xai_builtin_voice/normalize_xai_voice/get_xai_voice(Python), exported from the package root.XaiTTS(RESTvoice_id) andXaiRealtimeAdapter(session.updatevoice) trim + lowercase built-in ids; custom clonedvoice_ids stay opaque and are never rejected.XAI_REALTIME_DEFAULT_VOICEremains exported as an alias.providers.xai()(TTS, keyxai_tts) andxaiAsr()/xai_asr()(STT, keyxai). The PythonTTSConfig/STTConfigfactories intelephony/common.pynow resolve those keys toXaiTTS/XaiSTT(previously a dead end).patter initlists xAI in both STT and TTS provider tables (XAI_API_KEY).xai-tts.mdx, both SDKs) and CHANGELOG.Test plan
tsc --noEmitclean;vitest run166 files, 2616 passed / 9 skippedpytest tests3016 passed / 33 skipped / 2 xfailedxai-voices.test.ts(10),test_xai_voices.py(17), factory regression tests forxai()/xai_asr(), adapter tests asserting the normalized voice is what gets sent🤖 Generated with Claude Code