Text-guided audio editing. Describe an edit in plain text and apply it to an audio clip — insert, delete or replace sound events, aligned to time.
sonoscript is small and offline-first: the only runtime dependency is NumPy. Audio is exchanged as ordinary 16-bit PCM WAV, sounds are synthesised on the fly, and every edit is deterministic and reproducible.
Work in progress — the API is still settling.
pip install sonoscriptWrite instructions, one per line, and apply them to a clip:
import sonoscript as ss
clip = ss.load_wav("scene.wav")
edited = ss.apply_script(clip, """
insert bell at 2.0s
delete from 4.0s to 4.8s
replace from 6.0s to 7.0s with siren
""")
ss.write_wav("scene.edited.wav", edited)The same script runs from the command line:
sonoscript apply scene.wav --script edits.txt -o scene.edited.wavEach line is one edit. Times may be written as seconds (2, 2.5s) or as
mm:ss (1:30).
insert <voice> at <time> [gain <dB>] [for <duration>]
delete from <time> to <time>
replace from <time> to <time> with <voice>
Voices come from a small built-in palette (bell, beep, siren,
noise, click, chirp) — no audio assets required.
MIT — see LICENSE.