Skip to content

fix(tts): transcode xai ogg output paths - #57250

Closed
tianma-if wants to merge 1 commit into
NousResearch:mainfrom
tianma-if:codex/fix-xai-tts-explicit-ogg
Closed

fix(tts): transcode xai ogg output paths#57250
tianma-if wants to merge 1 commit into
NousResearch:mainfrom
tianma-if:codex/fix-xai-tts-explicit-ogg

Conversation

@tianma-if

Copy link
Copy Markdown
Contributor

Summary

  • synthesize xAI TTS .ogg requests to a sibling MP3 first
  • transcode that MP3 with the existing Opus helper so Telegram voice targets get real OGG/Opus
  • return the actual synthesized path when conversion is unavailable
  • add a regression test that keeps the xAI payload on the default MP3 codec while converting the local output

Fixes #57213

Tests

  • .venv/bin/python -m pytest tests/tools/test_tts_xai_speech_tags.py -q -k "transcodes_explicit_ogg_path or omits_speed or leaves_text"
  • .venv/bin/python -m ruff check tools/tts_tool.py tests/tools/test_tts_xai_speech_tags.py
  • .venv/bin/python -m pytest tests/tools/test_tts_xai_speech_tags.py -q
  • scripts/run_tests.sh tests/tools/test_tts_xai_speech_tags.py -q

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tools Tool registry, model_tools, toolsets tool/tts Text-to-speech and transcription provider/xai xAI (Grok) duplicate This issue or pull request already exists labels Jul 2, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #57222 — both PRs fix #57213 by editing tools/tts_tool.py::_generate_xai_tts to synthesize xAI TTS to a sibling MP3 and transcode it to Opus via _convert_to_opus for .ogg targets (same file, same mechanism, near-identical regression test). #57222 is the earlier open PR, kept as canonical. Both sit in the broader .ogg/Opus TTS cluster (#54589 / #54597 / #57190).

@tianma-if

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #57222 per triage; the earlier PR covers the same xAI TTS OGG transcoding fix. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists provider/xai xAI (Grok) tool/tts Text-to-speech and transcription type/bug Something isn't working

Projects

None yet

2 participants