Let's say I am trying to embed a Pi WH in my motorcycle helmet. I need thin speakers just by the ear to hear sounds (so, I don't need them to be too loud). 
* *by the way, piezo speakers won't do it in this project*

Since Pi WH doesn't have a 3.5mm audio jack, I think my choices are

1. use USB speakers
2. use PWM + audio amplifier + speakers

I can certainly buy a set of USB speakers and just connect to it, but the size matters. so I am thinking #2 would only be my choice.


As far as I researched, I think this is the way to go.

1. setup `Option 1. Use Device Tree Overlay` 
https://learn.adafruit.com/adding-basic-audio-ouput-to-raspberry-pi-zero/pi-zero-pwm-audio 

2. connect a [LM386 audio amplifier][1] to one of the PWM pins
- RPi 5v pin -> VCC 
- RPi ground -> GND
- RPi a PWM pin -> IN
- RPi ground -> GND


3. connect speakers like [this][2] to the audio amplifier

4. remove noises by [this config][3] `audio_pwm_mode=2`

5. play sounds by `aplay` command


Please let me know if any of the steps are wrong before I go ahead and buy all of the parts.



----------

**update**:

I did the followings to just make sure a speaker without an amplifier would sound just enough.. but I hear nothing coming out of the speaker.. 
**Anything I am missing or not doing right?**

1. add `dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4` to /boot/config.txt
2. `sudo raspi-config` -> Advanced Options -> Audio -> Force 3.5mm ('headphone') jack
3. reboot
4. `gpio readall` shows 
`ALT5 | GPIO. 1 | 1 | 18` 
and 
`| 13 | 23 | GPIO.23 | ALT0`
5. `alsamixer` and set the volume 100%
5. hooked a speaker like this (PWM0 = stereo right channel?)
6. `aplay some.mp3` 
** by the way, any mp3 files I played with `aplay` showed `Unsigned 8 bit, Rate 8000 Hz, Mono` even though I know some of the mp3s were actually stereo


[![enter image description here][4]][4]


 [1]: https://www.aliexpress.com/item/LM386-Module-20-Times-Gain-Audio-Amplifier-Module-in-selling/32343485357.html?spm=2114.search0104.3.8.2cc34c6bm8h58A&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_5723115_10068_5722815_10342_10343_10340_5722915_10341_5722615_10696_10084_10083_10618_10307_5722715_10059_100031_10103_10624_10623_10622_5722515_10621_10620,searchweb201603_50,ppcSwitch_7&algo_expid=60346333-5510-46dc-98e9-70989ca96496-1&algo_pvid=60346333-5510-46dc-98e9-70989ca96496&priceBeautifyAB=0
 [2]: https://www.sparkfun.com/products/10722
 [3]: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=195178
 [4]: https://i.sstatic.net/KT3iU.png