Skip to main content

foley

Find (or generate) the right sound effect for a moment of narration — and weave it in.

foley is a retrieval-first façade for sound effects: one simple surface over many sound sources (your own library, service APIs, and generative-AI models), a searchable index of every sound (by keyword and meaning), an agent that picks the right sound for a narrative context, and a compositor that places it under the voice.

It's the SFX sibling of arioso (a unified façade over AI music-generation backends): same discipline — one entry function, config-driven plugin adapters, a unified vocabulary translated per-backend, zero required core deps with lazy optional-deps — but centered on search rather than generation, with generation as just one of several sources.

Status: design-stage. The architecture is researched and specified; the code is being built. The API below is the intended surface (see the roadmap for what's live). Follow along in misc/docs/.

The idea

import foley

# The headline — right sounds for a narrative context:
# decompose the passage into salient sound events → search → verify → decide
candidates = foley.find("She pushed open the heavy oak door; rain hammered outside.")

# Direct hybrid search of your library (text query or a reference clip)
hits = foley.search("distant thunder rumble", k=10, commercial_ok=True)

# Generate a sound when nothing fits (arioso-style; pluggable backends)
clip = foley.generate(
    "a single wooden door creak", backend="stable_audio_open", duration=3
)

# Grow the library — ingest auto-tags, captions, and embeds every file
foley.ingest("~/my_sounds/")
foley.add_from("freesound", query="ocean waves", license="cc0")

# Compose (future): render the sound design onto a narration
foley.weave(narration_audio, candidates)

How it works — four stages

Stage What it does Built on
Source your own files · Freesound (CC0) · generate (Stable Audio Open / ElevenLabs) config-driven adapters, per-sound license tracking
Index probe → tag → caption → embed every sound; hybrid keyword+semantic search PANNs · CLAP · EnCLAP · LanceDB (local→cloud via dol)
Select decompose a narrative context → search → verify → generate-or-retrieve CLAP retrieval + LLM decomposition + a verification ladder
Weave align to the voice, duck, place, master (future) forced-alignment · LUFS/EBU-R128

The selection tools publish as an MCP server (via py2mcp) so the same capabilities drive the agent, a CLI, and external hosts.

Design & research

foley's design is grounded in five research reports (unified, cited):

Install

pip install foley

(Optional per-capability extras — foley[freesound], foley[clap], foley[stable-audio], foley[index], … — are added as each subsystem lands.)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foley-0.0.14.tar.gz (545.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foley-0.0.14-py3-none-any.whl (329.6 kB view details)

Uploaded Python 3

File details

Details for the file foley-0.0.14.tar.gz.

File metadata

  • Download URL: foley-0.0.14.tar.gz
  • Upload date:
  • Size: 545.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for foley-0.0.14.tar.gz
Algorithm Hash digest
SHA256 09ad6d4e93a9f0e9cba13b8791acdfd1abbc33719b82cf2ac012d0b2286a0074
MD5 93c5de7eb7d166ff57b16cce976a47c6
BLAKE2b-256 34fa878a04a87716925513c3980f8e9279a4ee413429728869d0297ce474e7c5

See more details on using hashes here.

File details

Details for the file foley-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: foley-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 329.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for foley-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 21ba0085e3306a34586ee1b177b16cfc0f322f558a9079958284faaad44a5f99
MD5 d412a1314c51931ff01533571300a25a
BLAKE2b-256 1f8ceeecb4e0b3841e12a989d98e8d51f24af88b487e45743e1fc12d2454cce1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

This release

0.0.14 This release

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page