Audio Studio
v1.3.1Generate local BGM, sound effects, and songs with vocals using Stable Audio 3 and YuE2
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_audio
Generate BGM, instrument loops/stems or sound effects from text with Stable Audio 3 (runs locally). Returns one WAV path per candidate.
| Parameter | Type | Description |
|---|---|---|
audio_type | string | music = BGM / full instrumental track; instrument = solo instrument, stem or loop; sfx = sound effect, ambience or one-shot; raw = no prefix (prompt used verbatim) |
bpm | Tempo for music/instrument; appended as 'BPM: N.' | |
cfg | number | Guidance. 1.0 = official default; 3–7 = stricter prompt adherence (≈2× slower). |
duration_seconds | Length in seconds. Default: music 60, instrument 12, sfx 5, raw 30. | |
negative_prompt | Qualities to avoid. Only takes effect when cfg != 1. | |
original_idea | string | The user's original request, verbatim and in their language. Stored in metadata only. |
peak_ceiling_db | Safety ceiling in dBFS: a louder peak is turned down to this, quieter audio is untouched. null disables. | |
prompt | string | English description (see server instructions). Optional for sfx when the sound_* fields are given. |
seed | Base seed for reproducibility; omit or -1 for random. | |
sound_action | string | SFX: how it is triggered and evolves over time (attack, decay, movement). |
sound_material | string | SFX: material, texture, timbre. |
sound_source | string | SFX: what makes the sound (object, instrument, creature, machine). |
sound_space | string | SFX: space and recording (indoor/outdoor, distance, dry/reverberant, mic). |
steps | integer | Sampling steps; 8 is the official default. |
title | Short name; used as the file name and stored in metadata. Auto-named if omitted. | |
variations | integer | Number of candidates (different seeds) to generate in one call. |
edit_audio
Edit existing audio with Stable Audio 3: variation (audio-to-audio), inpainting a time range, or continuation/extension. Returns one WAV path per candidate. Official tip: surrounding context outweighs the prompt — inpaint a large region first and shrink it, and keep prompts plausible for the context.
| Parameter | Type | Description |
|---|---|---|
input_audio * | string | Absolute path to an existing audio file (wav/mp3/flac/ogg). |
mode * | string | variation = audio-to-audio remix/style or timbre transfer of the whole clip; inpaint = regenerate only [start,end] and keep the rest; continue = extend the clip to duration_seconds, regenerating from… |
audio_type | string | Same prefixes as generate_audio. |
bpm | ||
cfg | number | |
duration_seconds | Output length. variation/inpaint default = input length; continue = required total length (> input length). | |
end_seconds | inpaint only: region end. | |
negative_prompt | Only used when cfg != 1. | |
original_idea | string | The user's original request, verbatim and in their language. Stored in metadata only. |
overlap_seconds | number | continue only: start regenerating this many seconds before the end of the audible content, so a trailing fade or silence is replaced and the join is smooth. |
peak_ceiling_db | Safety ceiling in dBFS: a louder peak is turned down to this, quieter audio is untouched. null disables. | |
prompt | string | What the result (or the regenerated region) should sound like. May be empty for continue. |
seed | Base seed for reproducibility; omit or -1 for random. | |
start_seconds | inpaint only: region start. | |
steps | integer | |
strength | number | variation only: init noise level. ~0.4 keeps melody/rhythm (timbre transfer), ~0.6 style transfer, 0.8+ loose. |
title | Short name; used as the file name and stored in metadata. Auto-named if omitted. | |
variations | integer | Number of candidates (different seeds). |
process_audio
Post-process and export a clip: trim, trim silence, mono, normalize (peak or LUFS), seamless loop, fades, then write 48 kHz/44.1 kHz WAV, OGG Vorbis or FLAC (+ .json sidecar). The input file is not modified. Steps run in that order. Does not load any model.
| Parameter | Type | Description |
|---|---|---|
input_audio * | string | Absolute path to an audio file (any format soundfile/ffmpeg reads). |
end_seconds | Trim: keep until here (default: end). | |
fade_in_ms | number | |
fade_out_ms | number | |
format | string | wav = 24-bit PCM; ogg = Ogg Vorbis (Unity/Godot); flac = 24-bit lossless. |
loop | boolean | Make a seamless loop by crossfading the tail into the head (output gets shorter by loop_crossfade_ms). |
loop_crossfade_ms | number | Loop crossfade: ~50–200 ms for rhythmic BGM cut on a bar, 500–2000 ms for ambience. |
mono | boolean | Downmix to mono (common for positional game SFX). |
normalize | string | none = only the safety ceiling; peak = scale so the peak hits peak_ceiling_db; loudness = EBU R128 to target_lufs, two-pass, linear gain when the true-peak limit allows it, otherwise ffmpeg's dynamic… |
ogg_quality | number | Vorbis quality 0.1–1.0 (0.6 ≈ 190 kbps stereo). |
peak_ceiling_db | number | Peak ceiling / target in dBFS. |
sample_rate | integer | 48000 for video; 44100 keeps the model's native rate (no resampling). |
silence_threshold_db | number | |
start_seconds | number | Trim: keep from here. |
target_lufs | number | loudness mode: -14 streaming/video, -16 game BGM, -23 broadcast. SFX are usually peak-normalized instead. |
title | Output file name stem. Default: <input>_proc. | |
trim_silence | boolean | Cut leading/trailing silence (useful for one-shot SFX). |
generate_song
Queue a local YuE2 song with vocals. Provide original lyrics with section labels and a style description, or replay_from a song WAV in the output folder to reuse its exact settings and seed. duration_seconds sets the cap. The model may end earlier. For caps of 30 seconds or less, suggest a single short chorus and a style prompt requesting the lead vocal on the first beat before submitting. Returns a job_id. Use song_status to check progress and retrieve the WAV. Use cancel_song to stop a waiting or running job.
| Parameter | Type | Description |
|---|---|---|
duration_seconds | integer | Maximum song length in seconds. For 30 seconds or less, use a single short chorus and ask for the lead vocal on the first beat in the style prompt. |
lyrics | string | Original lyrics in their language, with section tags such as [Verse], [Chorus] and [Bridge]. |
mode | string | auto = recommends an installed profile using memory estimates and the wait budget; fast = Q4_0; quality = Q8_0. |
replay_from | Path of a song WAV in the output folder. Replays its saved lyrics, style, seed, profile and ending; other arguments are ignored. | |
seed | Base seed for reproducibility; omit or -1 for random. | |
style | string | Genre, mood, tempo, instruments and vocal character, e.g. 'Japanese vocals, warm city pop, 100 BPM'. |
title | Short name used for the file name and metadata. | |
wait_budget_seconds | Auto only: the longest acceptable wait in seconds. Auto skips profiles whose estimate exceeds it. |
song_status
Get the status, selected profile, estimate and WAV result of a song job. Clients that show the generate_song player card do not need to poll; the card follows the job itself.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | job_id returned by generate_song. |
cancel_song
Cancel a queued or running song. Poll song_status until it is cancelled.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | job_id returned by generate_song. |
unload_models
Free the ~5–7 GB of memory held by the loaded models now (they reload on the next call).