Plugin.Maui.Audio icon indicating copy to clipboard operation
Plugin.Maui.Audio copied to clipboard

What is the audio format?

Open fady-intelligencex opened this issue 1 year ago • 1 comments

Hello,

I am currently working with the Plugin.Maui.Audio plugin in a .NET MAUI application and have encountered a few queries regarding the audio format used by the plugin.

Audio Format: Could you please clarify the default audio format used when recording audio using Plugin.Maui.Audio? I've noticed that the recorded files are saved with extensions like .tmp and .binlog, but I'm uncertain about the actual audio format (sample rate, bit depth, codec, etc.).

Saving to Specific Formats: I am interested in saving the recorded audio in standard formats like .wav or .mp3. I can see from the sample that I can access the audio stream, but I'm unsure of the stream's format. I am considering using naudio to convert it. If you have other ideas, please share them.

fady-intelligencex avatar Dec 15 '23 04:12 fady-intelligencex

Hi there!

Yeah we should probably add something to our readme. In the meantime you can find the information here.

iOS/macOS: https://github.com/jfversluis/Plugin.Maui.Audio/blob/main/src/Plugin.Maui.Audio/AudioRecorder/AudioRecorder.macios.cs#L84-L102

For Android it's a little less clear at a first glance, but the gist of it seems to happen here: https://github.com/jfversluis/Plugin.Maui.Audio/blob/main/src/Plugin.Maui.Audio/AudioRecorder/AudioRecorder.android.cs#L135-L149

On Windows we use the default settings: https://github.com/jfversluis/Plugin.Maui.Audio/blob/main/src/Plugin.Maui.Audio/AudioRecorder/AudioRecorder.windows.cs#L56

jfversluis avatar Dec 18 '23 08:12 jfversluis