Open
Conversation
markbackman
added a commit
that referenced
this pull request
Mar 24, 2026
Reworks the xAI TTS integration from #4031 with consistency fixes: - Rename to XAIHttpTTSService (leaves room for future WebSocket service) - Add proper language map with all 20 supported xAI languages - Remove unnecessary deprecated InputParams/params (new service, nothing to deprecate) - Add encoding as a constructor parameter - Use Language.EN enum instead of string for default language - Linting fixes
Contributor
|
Thanks for the contribution! Here are some changes needed before we can merge:
I made a branch while I was reviewing these changes. I've pushed these to origin for you to use as a starting point: Also, once this change is in, I think we'll move the GrokLLMService to the new xai module, so that services are consolidate. We can do that in a separate PR though. |
markbackman
added a commit
that referenced
this pull request
Mar 24, 2026
Reworks the xAI TTS integration from #4031 with consistency fixes: - Rename to XAIHttpTTSService (leaves room for future WebSocket service) - Add proper language map with all 20 supported xAI languages - Remove unnecessary deprecated InputParams/params (new service, nothing to deprecate) - Add encoding as a constructor parameter - Use Language.EN enum instead of string for default language - Linting fixes
…an up API - Rename XAITTSService → XAIHttpTTSService and XAITTSSettings → XAIHttpTTSSettings - Add language_to_xai_language() with explicit LANGUAGE_MAP using resolve_language() - Remove deprecated InputParams, params, voice, language init params - Remove XAI_DEFAULT_SAMPLE_RATE and XAI_PCM_CODEC constants; add encoding param - Set sample_rate=None default (picked up from PipelineParams or user) - Use Language.EN enum instead of string "en" for default language - Add changelog/4031.added.md - Add 07e-interruptible-xai.py foundational example - Update 14g-function-calling-grok.py to use XAIHttpTTSService - Register 07e in run-release-evals.py
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
XAIHttpTTSServicebacked by xAI's HTTP text-to-speech APILANGUAGE_MAPusingresolve_language()encoding(pcm, mp3, wav, mulaw, alaw) as a constructor parameter07e-interruptible-xai.pyfoundational example; update14g-function-calling-grok.pyto use xAI TTS07einrun-release-evals.pyTesting
uv run pytest tests/test_xai_tts.pyexamples/foundational/07e-interruptible-xai.pyusing a validGROK_API_KEY