2

this is my first post on here! I am trying to make my raspberry pi 3 a bluetooth speaker which synchronizes beat of the music being played from a phone to an LED light strip. For the LED light synchronization I have made a python script that uses PyAudio and AudioOp packages to do analysis on the audio input stream.

Right now, I am able to play music to the 3.5mm headphone jack of the raspberry pi 3 from my phone over bluetooth with no problem. However, my issue is creating an input source for PyAudio to recognize and read the incoming audio. I read into creating audio loop backs and virtual audio cables but I am a bit lost on the subject and I am not sure that is the right approach. Below are the established audio playback and capture devices when the raspberry pi boots up without any modification on my part.

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 6/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

**** List of CAPTURE Hardware Devices ****

I appreciate any guidance you may have for me to solve this problem.

1 Answer 1

2

About half way down on the following page it says:

https://github.com/Arkq/bluez-alsa

BlueALSA also allows to capture audio from the connected Bluetooth device. To do so, one has to use the capture PCM device, e.g.:

$ arecord -D bluealsa capture.wav

Using this feature, it is possible to create Bluetooth-powered speaker. It is required to forward audio signal from the BlueALSA capture PCM to some other playback PCM

Does that help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.