Feature Type
Would make my life easier
Feature Description
xAI's TTS API (both POST /v1/tts and the streaming wss://api.x.ai/v1/tts) supports a speed parameter (0.7–1.5, default 1.0) to control speech rate, but this isn't exposed for xAI in livekit-agents yet. XaiOptions in livekit.agents.inference.tts currently only has bit_rate:
class XaiOptions(TypedDict, total=False):
bit_rate: Literal[32000, 64000, 96000, 128000, 192000]
So there's no way to do this today:
tts = inference.TTS("xai/grok-tts", voice="eve", extra_kwargs={"speed": 1.2})
Other providers already have this (CartesiaOptions.speed, ElevenlabsOptions.speed, RimeOptions.speed_alpha, InworldOptions.speaking_rate), so it'd be nice to get xAI to parity. Docs: https://docs.x.ai/developers/model-capabilities/audio/text-to-speech
Not sure if livekit-plugins-xai (direct API key usage) already forwards speed — if it doesn't, probably worth fixing there too.
Workarounds / Alternatives
None currently — using a different TTS provider just for speed control isn't worth it for us.
Additional Context
No response
Feature Type
Would make my life easier
Feature Description
xAI's TTS API (both
POST /v1/ttsand the streamingwss://api.x.ai/v1/tts) supports aspeedparameter (0.7–1.5, default1.0) to control speech rate, but this isn't exposed for xAI inlivekit-agentsyet.XaiOptionsinlivekit.agents.inference.ttscurrently only hasbit_rate:So there's no way to do this today:
Other providers already have this (
CartesiaOptions.speed,ElevenlabsOptions.speed,RimeOptions.speed_alpha,InworldOptions.speaking_rate), so it'd be nice to get xAI to parity. Docs: https://docs.x.ai/developers/model-capabilities/audio/text-to-speechNot sure if
livekit-plugins-xai(direct API key usage) already forwardsspeed— if it doesn't, probably worth fixing there too.Workarounds / Alternatives
None currently — using a different TTS provider just for speed control isn't worth it for us.
Additional Context
No response