Record audio specifying rate and channels

I’ve been working with Media and Media Capture, trying to find a way to record audio in a specific set of formats. I can record, encode and send audio all day, but not in the formats I need.

I need single channel audio, any of a number of formats (AMR, LPMC (wav) are probably the most accessible) and I need to set the rates. Ideally, single channel wav, where I won’t need to bother with sample rates. At this point, I’d even be willing to run conversion on the MediaCapture AMR (wrong sample rate) file to WAV.

Are there any tools or advice that could assist me in this?

I am confused by question - part of the time you refer of the audio stream - i.e. rates and channels and then you talk about file formats which are concerned with saving the stream data.

Have a look at cordova-plugin-audioinput - this will give you the options you are after and the examples are very good.

1 Like

@JAR19 Thanks for your advice. I’m new to the ecosystem and the pointer to cordova-plugin-audioinput was exactly what I needed.