how do i change the speech rate in deepgram TTS? i...
# ask-ai
f
how do i change the speech rate in deepgram TTS? it speaks too fast
t
Thanks for reaching out, Viren. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to slow down Deepgram TTS because it speaks too fast — you can lower the
speed
parameter passed to the Deepgram TTS call. • Use
speed
< 1.0 to slow speech (1.0 = normal). Try values like 0.9, 0.8, 0.7 and test which feels right. Example — Python:
Copy code
inference.TTS(
  model="deepgram/aura-2",
  voice="athena",
  extra_kwargs={"speed": 0.8}
)
Example — Node.js/TypeScript:
Copy code
new inference.TTS({
  model: "deepgram/aura-2",
  voice: "athena",
  modelOptions: { speed: 0.8 }
})
Would you like a suggested starting value for voice X or help testing different speeds? Sources: Deepgram TTS | LiveKit docs
f
getting error: TypeError: TTS.__init__() got an unexpected keyword argument 'extra_kwargs' code: deepgram.TTS(model="aura-2-andromeda-en",sample_rate=24000, extra_kwargs={"speed": 0.7})
t
You're hitting that error because
extra_kwargs
isn't accepted by the Deepgram plugin TTS constructor. Since you're using the plugin, pass
speed
directly. Use this in Python:
Copy code
deepgram.TTS(
  model="aura-2-andromeda-en",
  sample_rate=24000,
  speed=0.7
)
If you intended to use LiveKit Inference TTS (where
extra_kwargs
is supported), tell me which SDK (Python or Node.js) and I’ll show that alternative. Sources: Deepgram STT plugin guide | LiveKit docs | Deepgram TTS plugin guide | LiveKit Docs
f
python i am using error: TTS.__init__() got an unexpected keyword argument 'speed'
t
You're using the Deepgram plugin TTS in Python but getting errors because neither
extra_kwargs
nor
speed
are accepted by that constructor. To fix this, tell me which you want to use and I’ll give the exact code: 1) Use LiveKit Inference TTS (supports
extra_kwargs.speed
) — tell me if you can import
inference.TTS
from
livekit.agents
. If yes, I’ll provide the working snippet. 2) Stay with the Deepgram plugin (
from livekit.plugins import deepgram
) — it does not accept
speed
. Tell me if you want to: • Use prompting with pauses/SSML-like tags to slow speech, or • Switch to LiveKit Inference for direct speed control. Which option do you want to proceed with, and can you paste the import line you currently use for TTS? Sources: Deepgram TTS plugin guide | LiveKit Docs