-
Notifications
You must be signed in to change notification settings - Fork 116
Fully configure frame processors when they are used directly on an audio stream #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
1egoman
wants to merge
20
commits into
main
Choose a base branch
from
frame-processor-on-audio-stream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
538fc13
feat: add MVP of propagating room downwards from room -> track -> aud…
1egoman 7c7eaa4
feat: call _on_stream_info_updated with parent room reference on audi…
1egoman 12718d1
feat: call _on_credentials_updated with token / server url extracted …
1egoman af26b3d
fix: remove debugging logs
1egoman 5ecca5d
fix: address lint errors
1egoman af56d61
feat: only call frame processor handlers if room is set
1egoman f62c247
fix: properly intercept room refresh token events
1egoman e7ab10e
feat: add from __future__ import annotations to remove string types
1egoman f7f422d
fix: address incorrect docs
1egoman 24f2b6e
refactor: centralize frame processor state logic into Track, not Audi…
1egoman ad32574
feat: add auto cleanup of FrameProcessor as opt-out
1egoman ce5e793
fix: disable no-op credentials push
1egoman b9f34d0
fix: move processor close from __del__ to aclose
1egoman 4c73cc8
fix: proxy throgh noise_cancellation_leave_open into AudioStream.from…
1egoman 22f4896
fix: include missed noise_cancellation_leave_open in from_track
1egoman 2dbe350
fix: address type checker warning
1egoman 07fec79
feat: add new _on_stream_info_cleared / _on_credentials_cleared Frame…
1egoman 8d3f4fe
fix: apply devin suggestion
1egoman 7743e6a
feat: add new frame processor tests
1egoman 75d8874
fix: address type errors in tests
1egoman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Can we move that inside NoiseCancellationOptions?
Uh oh!
There was an error while loading. Please reload this page.
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.
Unfortunately, no - this is important to the
FrameProcessor[AudioFrame]side of thatnoise_cancellationunion. Open to putting it somewhere else but it needs to be settable in theFrameProcessorpath.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.
hmm, not sure if it's a good idea, but could it be a field on the
FrameProcessorinterface instead?Then we could add it to NoiseCancellationOptions and new FrameProcessors would be able to set it on the processor itself
Uh oh!
There was an error while loading. Please reload this page.
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.
It's not a setting that a frame processor would always want to have set or not have set, so I'm not sure that would really make sense either.
For context, the reason this is here is so the agents sdk can reuse a single
FrameProcessoracross multiple underlying tracks. Previously, this wasn't a problem in the way this used to work, because the agents sdk had the responsibility of closing theFrameProcessor, so it could easily do it at room disconnection time. But in order to support the ability to useFrameProcessors directly on anAudioStream, callingcloseneeds to be pushed down deeper than the agents sdk layer. This flag allows the caller to explictly tellAudioStreamthat they will manage cleaning up theFrameProcessorso that both use cases can continue to work.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.
I think this flag is not really configuring the noise suppression behavior, but how AudioStream deals with its own noise suppression, maybe the naming of noise_cancellation_leave_open is a bit confusing ?
how about close_noise_cancellation_on_stream_close or manage_noise_cancellation_processor ?