# 藍芽音箱 ###### tags: `Speaker` `Funtion` `useServer` ## 需要初始化的東西 1. 安裝 bluetoothctl ## 使用套件 - [pyaudio](http://people.csail.mit.edu/hubert/pyaudio/docs/)輸出聲音 - Class stream() - **output_device_index** – Index of Output Device to use. Unspecified (or None) uses the default device. Ignored if output is False. - [get_device_output](https://forums.raspberrypi.com/viewtopic.php?t=224856) - [pybluez](https://github.com/pybluez/pybluez) 連接藍芽 - 需要先 sudo apt-get install libbluetooth-dev - pacmd ### Reference - [Pexpect Document](https://pexpect.readthedocs.io/en/stable/) - https://www.landley.net/kdocs/ols/2006/ols2006v1-pages-421-426.pdf https://git.kernel.org/pub/scm/bluetooth/bluez.git/ # Notes ## BLuez D-bus API 1. org.bluez.Manager 2. org.bluez.Adapter 3. org.bluez.Security