Freesound: Sound Effects for Your Games
Freesound is a huge library of user-uploaded sounds, like footsteps, coins, explosions, and ambience. With a free API key, the bot can search for sounds and add them straight into the game.
| Cost | Free |
| Needs a Bash API key? | ✅ Yes, a Freesound API key |
| What the bot can get | Search results and preview files (MP3/OGG, good enough for games) |
| What it can’t get | Original-quality files. Those need a Freesound login flow (OAuth2) |
| Good for | Sound effects. Some music loops too |
Licenses: read this first
Every sound has its own license. Have the bot only use sounds you can put in any game:
| License | OK in games? | What you must do |
|---|---|---|
| CC0 | ✅ Yes | Nothing |
| CC BY 4.0 (Attribution) | ✅ Yes | Credit the creator (the bot writes www/CREDITS.md) |
| CC BY-NC (NonCommercial) | ⚠️ Only free games without ads | Credit, and never sell or monetize the game |
Tip for the bot: “only CC0 and CC BY sounds.”
Part 1: Get an API key
- Make a free account at https://freesound.org.
- Go to https://freesound.org/apiv2/apply, fill in a name (like
Bash games) and a short description, and accept the terms. - In the table that appears, copy the value in the Client secret / Api key column. That’s your key.
Part 2: Add it to Bash
Gear icon → API keys → Any API
| Field | Value |
|---|---|
| Address | freesound.org |
| Name | Freesound |
| Key | your API key |
| How it’s sent | A header named Authorization with the value Token <key>. Freesound expects the word Token, not Bearer |
| Tips for the bot | Freesound API key. Only use CC0 and CC BY sounds, download the HQ preview, and add credits to www/CREDITS.md. |
If the Bash form only offers Bearer token, pick it anyway and ask the bot to test. If Freesound rejects it, tell the bot. Freesound also accepts the key as a
?token=in the address, but Bash can’t add that for you. In that case, use the music and sound sites in Royalty-free music (no key needed).
Part 3: Ask for sounds
Find a short coin pickup sound on Freesound (CC0 or CC BY) and play it when the player gets a coin.
The bot will:
- Search:
GET https://freesound.org/apiv2/search/text/?query=coin&filter=license:("Creative Commons 0" OR "Attribution") - Pick a short, good-rated result and download its
preview-hq-oggorpreview-hq-mp3 - Save it to
www/assets/sfx/, hook it into the game, and add a line towww/CREDITS.md:"Coin" by <user> (freesound.org/s/<id>), CC BY 4.0
Troubleshooting
| Problem | Fix |
|---|---|
401 Authentication credentials were not provided |
The key isn’t attached. Check the address is freesound.org and how it’s sent (Token <key>). |
Download sound needs OAuth2 |
Expected. Use the preview files instead. |
| A sound turned out to be NC | Swap it, or keep the game free and ad-free. The bot can list every sound’s license. |
Checklist
- Freesound account + API key
- Key in Bash (
freesound.org,Tokenheader) - Tip: only CC0 / CC BY
www/CREDITS.mdlists every sound used
Links
- API docs: https://freesound.org/docs/api/
- Authentication: https://freesound.org/docs/api/authentication.html