Conversation
- pipecat's soxr VHQ stream resampler held 10-76 ms of audio, which is too long. - Replaced it with av.AudioResampler. It holds 1 ms of audio and gives output for every packet. - UserAudioRawFrame.pts is the pts of the first sample in the frame. - Each participant now gets a separate resampler, so audio and pts of different participants do not mix. - The resampler of a participant is removed when their audio track is unsubscribed, because a new track restarts its pts.
- Resamplers are keyed by (user_id, session_id). A rejoined participant gets a new resampler, also when old audio arrives after the leave event. Two sessions of one user do not mix. - Resamplers are removed when the participant leaves, not when an audio track is unsubscribed. Mute and the end of a screen share do not lose audio. - getstream's FrameResampler skips empty chunks and rebuilds the resampler when the input format changes. Before, both stopped the audio input task. - UserAudioRawFrame.pts is calculated exactly, without float truncation. - Tests read an exact number of frames and do not wait for timeouts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pipecat's soxr VHQ stream resampler held 10-76 ms of audio, which is too long.
Replaced it with av.AudioResampler. It holds 1 ms of audio and gives output for every packet.
UserAudioRawFrame.pts is the pts of the first sample in the frame.
Each participant now gets a separate resampler, so audio and pts of different participants do not mix.
The resampler of a participant is removed when their audio track is unsubscribed, because a new track restarts its pts.