google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.06k stars 5.11k forks source link

Expose device index to user for AudioRecorder class #5185

Open hakan-demirli opened 7 months ago

hakan-demirli commented 7 months ago

MediaPipe Solution (you are using)

AudioRecord

Programming language

Python

Are you willing to contribute it

Yes

Describe the feature and the current behaviour/state

Currently only the default microphone is selected. I wish to specify the device index myself.

Will this change the current API? How?

Yes. It will extend the AudioRecord Class API.

Who will benefit with this feature?

People with multiple microphones or wrong default microphone.

Please specify the use cases for this feature

Assign specific microphone to specific AI.

Any Other info

This line here needs to change: https://github.com/google/mediapipe/blob/5f16f6724685c15d7cdc66c1e4d12f31932dfb45/mediapipe/tasks/python/audio/core/audio_record.py#L77

ayushgdev commented 7 months ago

Hello @hakan-demirli Thanks for raising this API extension request. We shall forward the request to concerned development team and prioritize it internally.