Docs

Use openfoley sounds and collections in your app, and generate your own.

Using sounds

Every sound on openfoley has a permanent URL. The easiest way to use it in React is react-sounds:

npm install react-sounds howler
import { useSound } from "react-sounds";

function Toggle() {
  const { play } = useSound("https://cdn.openfoley.com/sounds/…mp3");
  return <button onClick={() => play()}>Toggle</button>;
}

Sound URLs never change and published sounds can't be deleted, so they are safe to use in production. Creators can unlist a sound, which hides it from search and browse; its URL keeps working.

Collections

Collections work as react-sounds sound packs. Add a collection to your project with the CLI (react-sounds 1.1 or later). This creates a JSON manifest and TypeScript types for the sound names.

# latest version
npx react-sounds-cli add https://openfoley.com/c/<collection>

# pinned to version 3
npx react-sounds-cli add https://openfoley.com/c/<collection>/v/3

# copy the sound files into your project instead of linking them
npx react-sounds-cli add https://openfoley.com/c/<collection> --download

Collections are versioned. The owner edits a collection freely and publishes a new version when it's ready; until then, apps keep getting the previous one. A pinned version never changes, so the sounds and names your app uses stay available. Published collections can't be deleted.

import uiPack from "./sounds/<collection>.json";

<SoundProvider packs={[uiPack]}>
  <App />
</SoundProvider>

const { play } = useSound("<collection>/save");

Generating sounds

  • API key: Sounds are generated with Stable Audio 3 on fal using your own fal API key. You can add it in your account settings.
  • Model: Medium (Stable Audio 3 Medium) is the default and sounds best. Small costs less and is fine for simple clicks and pops.
  • Cost: fal charges about $0.04 per variation with Medium and $0.02 with Small. The generate page shows an estimate before you start. openfoley doesn't charge anything.
  • Improve prompt with AI: On by default. A language model turns your description into a detailed prompt, picks a length when the length is set to Auto, and writes a name, description and search keywords for the sound. It runs on your fal key and costs about $0.008. You can turn it off with the wand button below the prompt.
  • Usage: Every variation is listed in your account. Failed generations are not counted.
  • Drafts: Generated sounds are private until you publish them. Unpublished drafts are deleted after 7 days.

License

Public sounds are dedicated to the public domain under CC0 1.0 by their creators. You can use, change and share them in personal and commercial projects without attribution.

The sounds are AI-generated with Stable Audio 3 (Stability AI) from the prompts shown with them. They come without any warranty: neither openfoley nor the creators guarantee that a sound is free of third-party rights, for example if it happens to resemble an existing recording or sound trademark. See the Terms for details.