Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
880 stars 575 forks source link

[HELP]: How to Stream Audio from a headphone Using Flutter_Sound? #1038

Open vaishnavijlk opened 6 months ago

vaishnavijlk commented 6 months ago

Here is my question :

How to Stream Audio from a Headphone Using Flutter_Sound?

  1. I have a use case where I need to stream audio from a stethoscope connected to my Android device via the microphone jack.
  2. Another use case involves streaming audio from a Bluetooth-connected stethoscope to my Android device.

Any help would be greatly appreciated. Thank you!

Larpoux commented 6 months ago

iOS or Android ?

Android is OK but there is actually a big problem on iOS when recording to Streams or when recording to Raw PCM. If you want Raw PCM, a turn around is to record to WAV and call Flutter Sound helper to remove the WAV envelop.

It used to work, but not anymore (regression). I have not found the reason of the problem. Actually I have not much time to spend on Flutter Sound maintenance and someone else should try to debug that.

I am actually in the process of rewriting all the code about RAW PCM on iOS, but this is much work and do not expect to have this issue fixed soon. Sorry

vaishnavijlk commented 6 months ago

Thank you for your response @Larpoux . I appreciate the information. For my current project, I am specifically looking to achieve this functionality on "Android" . Any guidance or solutions for my requirement would be greatly appreciated.

Larpoux commented 6 months ago

Record To Stream An example I really want this feature working correctly.

Actually works only with RAW PCM INT16 Please feel free to post more informations for this feature.

Larpoux commented 6 months ago

You can also look to this example

vaishnavijlk commented 6 months ago

Thanks for sharing the information. Is it possible to stream the recorded audio when the microphone jack is still connected to the android device which I'm running ?