breezy-kangaroo-57146
11/19/2025, 11:02 PMrefined-appointment-81829
11/19/2025, 11:38 PMbreezy-kangaroo-57146
11/19/2025, 11:59 PMawait session.start(
agent=agent,
room=ctx.room,
room_input_options=room_io.RoomInputOptions(audio_sample_rate=8000),
room_output_options=room_io.RoomOutputOptions(audio_sample_rate=8000),
)
and my tts
from livekit.plugins.azure.tts import ProsodyConfig
speech_config = speechsdk.SpeechConfig(
subscription=speech_key,
region=speech_region
)
speech_config.set_speech_synthesis_output_format(
speechsdk.SpeechSynthesisOutputFormat.Raw8Khz16BitMonoPcm
)
prosody_config = ProsodyConfig(rate=0.9,volume='loud') # ~10% faster speech
return azure.TTS(
speech_key=speech_key,
speech_region=speech_region,
voice=voice_id,
language=language,
prosody=prosody_config,
http_session=http_session,
)
my sip participant is|
request = CreateSIPParticipantRequest(
sip_trunk_id=trunk_id,
sip_call_to=phone_number,
room_name=room_name,
participant_identity="phone_user",
participant_name=participant_name,
play_dialtone=play_dialtone,
krisp_enabled=True,
wait_until_answered=True
)
But for some reason it is still robotic. I asked twilio about enabling HD sound but Twilio support told me that Twilio’s Elastic SIP Trunking will always transcode audio to and from 8 kHz G.711, so HD codecs like Opus can’t be preserved end-to-end and this is what’s causing the muffled/watery artifacts we’re hearing.
Twilio support told me to instead send 8 kHz, 16-bit PCM or μ-law mono audio that’s already normalized/compressed, free of silence padding or low-frequency noise, and ensure the TTS provider outputs pure PCM or μ-law to minimize distortion in Twilio’s transcoding pipeline.
So I am puzzled what can be done to improve this?breezy-kangaroo-57146
11/20/2025, 12:00 AMmodern-laptop-64491
11/26/2025, 2:33 PMmodern-laptop-64491
11/26/2025, 2:35 PMbreezy-kangaroo-57146
11/26/2025, 2:41 PMbreezy-kangaroo-57146
11/26/2025, 2:41 PMbreezy-kangaroo-57146
11/26/2025, 2:41 PM