Repository navigation
Adding Sounds
You'll need: a sound file, a free sound editor such as Audacity, the simulator · Time: 15 minutes
Lola's sounds are WAV files in the sounds/ folder. They aren't included in the project or the downloads, so you make or find your own and give them the names on the Sound list. The board is fussy about their format, so every file must be saved the same way.
Only use sounds you're allowed to use: ones you recorded yourself, or ones whose licence lets you.
- Open your sound in Audacity.
- Set the project rate (bottom-left) to 22050 Hz.
- Make it stereo: if it's mono, choose Tracks > Add New > Stereo Track and paste it in, or duplicate the track and Make Stereo Track.
- Choose File > Export Audio….
- Pick WAV, encoding Signed 16-bit PCM.
- Give it a short name with no spaces, such as
beep.wav, and save.
- Name your file exactly as on the Sound list, for example
noseBoops.wav(capital letters matter). - Copy it into
PropMaker_Feather/sounds/(make the folder if it isn't there), replacing any old one. - In the simulator, open the Audio panel and click Play next to it to hear it.
- If it's shown in red, the robot can't play it: the panel says why. Export it again with the settings above.
- Boop Lola in the simulator to hear it in action, then copy it to the robot.

Any WAV in sounds/ might be picked as the sound she plays after start-up. Just drop it in.
In a behaviour file, add a line like:
await play_wav("beep.wav")and add play_wav to the from hardware import ... line at the top if it isn't there.
Your file shows in the Audio panel with no red, and plays when the behaviour runs. The Log shows [sim] Sound: beep.wav.
| Problem | Fix |
|---|---|
ValueError: The sample's sample_rate does not match |
The file isn't 22050 Hz, stereo, 16-bit signed. Export it again. |
| The Audio panel says a file is missing | A play_wav("…") in the code names a file that isn't in sounds/. Check the spelling and capitals. |
| It plays in the simulator but not the robot | Copy the new file to CIRCUITPY's sounds folder (Copy the firmware). |
- The mixer in
hardware.pyisaudiomixer.Mixer(voice_count=1, sample_rate=22050, channel_count=2, bits_per_sample=16, samples_signed=True). Every WAV must match it; the simulator raises the sameValueErroras CircuitPython 9.2 when one doesn't. -
play_wav(name, loop=False)returns straight away. There's one voice, so a new sound stops the last one.stop_wav()stops a looped sound. - The board's flash is small (about 8 MB on the Prop-Maker Feather). Keep sounds short.
- Full list of the names the firmware uses: Sound list.
-
sounds/is in.gitignore, so your files stay on your computer and never go into git.
DD-L0-LA59 Animatronics · Project on GitHub · Report a problem with this page · Edit these pages in the wiki/ folder
Start here
Using the simulator
- Get the simulator
- A tour of the window
- Make her breathe, boop and more
- Camera, overlays and recording
- Speed, scenarios and panels
- Layouts, themes and shortcuts
- Accessibility
- Troubleshooting and FAQ
Building the robot
- Safety first
- Parts list
- Wiring
- Install CircuitPython
- Copy the firmware
- Calibrate the wings
- Test it and read the log
Changing how she behaves
Adding new hardware
For developers
- Building the simulator
- Project layout
- CI and releases
- Contributing and branching
- Simulator architecture
- Adding a part kind
Reference