Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching the PCM branch to divide by
24000instead of24fixes the sample‑rate bug but also changes every computed duration by 1/1000. The existing tests still assert values based on the old24constant (e.g.,tests/realtime/test_openai_realtime.py::test_calculate_audio_length_ms_pure_functionexpects48bytes to equal1000 ms, andtests/realtime/test_playback_tracker.pyuses the same assumption), so the suite will now fail and callers relying on those expectations may still treat 48 bytes as one second. The tests and any hard‑coded comments need to be updated to use 24 kHz math (len(bytes) / (24000 * 2) * 1000) to keep the build green and ensure downstream logic matches the corrected behavior.Useful? React with 👍 / 👎.