serenadeai / speech-recorder

speech-recorder is a node.js module for streaming audio from a device's microphone and filtering for speech.
MIT License
86 stars 19 forks source link

How to get default device and its supported sample rates? #5

Open ricardopolo opened 3 years ago

ricardopolo commented 3 years ago

To start: Great library!!

To the issue: With getDevices() I can get the list of the devices, but I don't know which one is the default.

Can you please expose a isDefaultInput and IsDefaultOutput values? I think you already have them since you are able to detect the default device for speech detection. Other libraries like node-portaudio expose this values.

Also I would love to have the supportedSamplesRates, not only the default one (defaultSampleRate). This way I can test if the mic will work with webrtcvad or if I show and error to the end user.

Thanks a lot!!