Skip to content
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

Feature Request: Allow Selective Track Subscription for VoiceAssistant #1399

Open
boussaidev opened this issue Jan 21, 2025 · 3 comments
Open
Labels
bug Something isn't working

Comments

@boussaidev
Copy link

Description: Currently, the VoiceAssistant automatically subscribes to all participant audio tracks when instantiated, even when AutoSubscribe.SUBSCRIBE_NONE is used. This behavior prevents the ability to selectively subscribe to specific tracks and ignore others.

In use cases like the WebRTC web app, there is a need for the voice assistant to subscribe only to a specific participant's audio track, while ensuring that the other participant cannot hear the audio. The track should have a unique identifier (e.g., a custom name) so that the agent can subscribe to it while other participants' audio is ignored.

Proposed Solution: It would be beneficial if the VoiceAssistant instance could support more granular control over track subscriptions. Specifically, adding a feature to allow the agent to subscribe to specific tracks based on a unique identifier, while ignoring other tracks.

This would allow better flexibility in managing track subscriptions and would be especially useful for applications where private communication with the agent is required without broadcasting audio to other participants.

Use Case:

In a WebRTC web app, a user can interact with the voice assistant while ensuring the other participant does not hear the audio.
The agent can subscribe to a participant's specific audio track using its unique name or identifier, while other tracks are ignored.
Benefits:

Enhanced control over which audio tracks the agent subscribes to.
Improved privacy and user experience in scenarios with multiple participants.
Would love to see this functionality added to the VoiceAssistant!

@boussaidev boussaidev added the bug Something isn't working label Jan 21, 2025
@boussaidev
Copy link
Author

@dsa
@nfma

@longcw
Copy link
Collaborator

longcw commented Jan 23, 2025

Thanks for the suggestion. The current agent will automatically subscribe to the first participant to join the room. An upcoming major release will allow subscribing to any specific participant and switching the audio input to the agent 🚀

@boussaidev
Copy link
Author

i implemented this feature in #1413 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants