0

I'm currently working on a project and everything is going well except for one part. This troublesome part requires me to send and receive real-time audio between my raspberry pi 4 and Bluetooth earphones. I saw a similar post like this one: Reading input sound signal using Python. However, this doesn't fit my situation since there isn't a physical connection between the two devices since it's occurring through Bluetooth.

How can I send my processed audio data to a pair of earphones and have that device send audio data back to my Pi system using Python? It would be awesome if there were some packages and well-documented examples.

Bluetooth headphones I've been using: https://www.amazon.com/Skullcandy-Sesh-True-Wireless-Earbud/dp/B0857JLRFJ/ref=asc_df_B0857JLRFJ/?tag=hyprod-20&linkCode=df0&hvadid=459477192655&hvpos=&hvnetw=g&hvrand=8647089529284755064&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9033299&hvtargid=pla-923127348415&psc=1

TristonL
  • 11
  • 4

1 Answers1

0

Since you are using a normal set of headphones you need to implement the Bluetooth Classic Handsfree Profile (HFP). this library could help you, but I'm not sure since the library expects you to have a audio card to stream to. But maybe it's a start! Another example shows only the audio streaming to a headset.

If this does not work you might be better of connecting the headphones directly to the Raspberry Pi and getting the audio from the system.

Michael Kotzjan
  • 2,093
  • 2
  • 14
  • 23