feat: add grok-tts tool (text-to-speech) - #35
Conversation
New TTS surface per issue #21 (PR 1 of 5). make_tts_request() always requests with_timestamps from the API so the response is always the JSON+base64 shape, avoiding a content-type branch. Returns AudioContent plus an optional word-timestamp table. v1 cut: no output_format codec/sample-rate customization (MP3 24kHz 128kbps default only), per docs/issue-21-scope.md.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
grok-ttstool perdocs/issue-21-scope.md(from docs: scope issue #21 (TTS, STT, Files API, Context Compaction, Batch) #34).TTS_API_BASE,TTS_VOICES(eve/ara/rex/sal/leo),DEFAULT_TTS_VOICE.make_tts_request()— always sendswith_timestamps: trueinternally so the API always returns the JSON+base64 shape, avoiding a content-type branch.handle_grok_tts()— validatestext, returnsAudioContent(base64 MP3) plus aTextContentsummary, with an optional word-timestamp table whenwith_timestamps: trueis requested by the caller.list_tools()/ dispatched incall_tool().v1 cut: no
output_formatcodec/sample-rate customization — MP3 24kHz/128kbps default only (flagged in the scope doc as a follow-up if needed).Test plan
pytest tests/test_audio_tools.py -v— 8/8 new tests passpytest tests/— 142 passed, 51 pre-existing failures (known pytest-asyncio strict-mode baseline, unrelated to this change), 3 skipped — no regressionsgrok-ttsappears inlist_tools()output (20 tools total, up from 19)XAI_API_KEY🤖 Generated with Claude Code