- Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
Describe the bug
The function calculate_audio_length_ms defined in realtime/_util.py has an issue:
def calculate_audio_length_ms(format: RealtimeAudioFormat | None, audio_bytes: bytes) -> float: if format and isinstance(format, str) and format.startswith("g711"): return (len(audio_bytes) / 8000) * 1000 return (len(audio_bytes) / 24 / 2) * 1000 if the audio is g711, it will answer a number of milllisecond; however, if the audio is 16bits 24kHz PCM, it will answer a number of microseconds.
Debug information
- Agents SDK version: (e.g.
v0.4.2)