an.sounds_cli#
an sounds …: the project’s sounds store from the shell (an#318).
Thin projections of an.sounds and an.sound_fetch, wired into the
CLI by an.tools._dispatch_namespaces.
Functions
|
Add a sound to the project from a URL (a YouTube page, any page yb reads) or a foley library (foley:<sound_id>), with its provenance. |
|
Record where a sound's hit is, so a cue puts the hit (not the file's first sample) at its |
- an.sounds_cli.add(project_dir, key, url, license='', start=0.0, duration=0.0, fade_out=0.0, provider='', author='', description='')[source]#
Add a sound to the project from a URL (a YouTube page, any page yb reads) or a foley library (foley:<sound_id>), with its provenance.
The audio is fetched with yb (pip install yb yt-dlp), or exported by foley for a foley:<sound_id> ref, cut with ffmpeg and stored as WAV; the source records the page, its id, title and channel, the cut, and the licence you give —
an creditslists it as “0:07.9–0:08.8 of <url>”. A foley sound carries its own rights (licence, credit, an AI disclosure), so –license may be left out; one that disagrees is refused.project_dir: the an project key: the sound’s key in the project’s sounds store (what a cue names) url: the page the sound is on, or foley:<sound_id> license: the licence code you vouch for (required unless the source states its own, as a foley sound does; “unknown” records that nobody has said, and the sound is UNVERIFIED) start: seconds into the media where the cut begins duration: seconds kept (default: to the end) fade_out: seconds of fade at the end of the cut provider: override the provider the page reports (default: youtube, or the host) author: override the author the page reports (default: its channel) description: what the sound is, for the store
- Return type:
- an.sounds_cli.sync(project_dir, key, at='auto')[source]#
Record where a sound’s hit is, so a cue puts the hit (not the file’s first sample) at its
at.A clip whose clink comes after a scrape, or after silence, is heard late by that lead-in when it is cued by its first sample;
an validatewarns when a cued hit is 125 ms or more into its file. Only sound.json changes.project_dir: the an project key: the sound’s key in the project’s sounds store at: seconds into the file, “auto” to measure it (the first 10 ms within 6 dB of the loudest), or “none” to clear it
- Return type: