Audio Editing
Trim audio locally with the Wonda CLI and route AI audio cleanup through direct audio endpoints.
Audio editing is CLI-first. wonda edit audio runs local ffmpeg operations, uploads the result, and prints the output mediaId.
The retired POST /api/v1/audio/edit endpoint returns 410 Gone with a CLI migration hint. Move audio trim scripts to the CLI command below.
Setup
npm i -g @degausai/wonda
wonda auth login
wonda doctorTrim audio
Use audioTrim with --audio-media. The value can be a Wonda media ID or a local file path.
wonda edit audio --operation audioTrim \
--audio-media 019e1b73-32a4-8c9e-8bbf-3661a14a5716 \
--params '{"trimStartMs":1000,"trimEndMs":8000}' \
--wait -o ./trimmed.mp3Parameters:
| Parameter | Type | Description |
|---|---|---|
trimStartMs | int | Start of the kept range, in milliseconds. |
trimEndMs | int | End of the kept range, in milliseconds. 0 means until the end. |
Without --output, the CLI prints:
{
"mediaId": "019e1b73-32a4-8c9e-8bbf-3661a14a5716",
"status": "succeeded"
}Audio AI operations
Audio enhancement and voice extraction are direct inference workflows, not editor operations:
| Need | API endpoint | CLI command |
|---|---|---|
| Denoise or enhance audio | POST /audio/enhance | wonda audio enhance <video-or-audio> |
| Isolate vocals from a track | POST /audio/extract-voice | wonda audio extract-voice <video-or-audio> |
Both API endpoints expect an audio media input. The CLI commands can accept a video or audio input and handle local audio extraction before calling the API.