generate_music
Turn a style prompt into a music track with optional lyrics, tempo, key, and duration; returns a local WAV file ready for use.
Instructions
Generate a music track from a style prompt; returns a local WAV path.
Args: prompt_style: Style description, e.g. "lo-fi hip hop, mellow piano". model: Music model id. Defaults to MLX_SERVE_MUSIC_MODEL. lyrics: Optional lyrics for vocal tracks. instrumental: True for no vocals (default true for text2music). duration_seconds: Target length 10..600 (default 60). bpm: Tempo, e.g. 120. keyscale: Musical key, e.g. "C major" / "E minor". timesignature: Time signature, e.g. "4/4". vocal_language: Vocal language code for sung lyrics, e.g. "en", "zh". task: "text2music" (default) | "cover" | "complete". src_audio_path: Local WAV (10-600 s) source for cover/complete tasks; its length becomes the output length. cover_strength: 0..1 how strongly to follow the cover source (default 1). seed: Optional seed for reproducibility. steps: Optional sampling steps (music3 backend only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | No | ||
| seed | No | ||
| task | No | ||
| model | No | ||
| steps | No | ||
| lyrics | No | ||
| keyscale | No | ||
| instrumental | No | ||
| prompt_style | Yes | ||
| timesignature | No | ||
| cover_strength | No | ||
| src_audio_path | No | ||
| vocal_language | No | ||
| duration_seconds | No |