diff --git a/embd_res/kcpp_docs.embd b/embd_res/kcpp_docs.embd index 5dbc27336..db6b6801a 100644 --- a/embd_res/kcpp_docs.embd +++ b/embd_res/kcpp_docs.embd @@ -1644,6 +1644,144 @@ }, } }, + "/api/extra/music/prepare": { + "post": { + "summary": "Creates song generation parameters such as caption, lyrics, BPM and duration", + "description": "Creates song generation parameters such as caption, lyrics, BPM and duration. This should be called to produce the generation input for /api/extra/music/generate", + "requestBody": { + "content": { + "application/json": { + "example": { + "caption": "An emotional rap song about the kobold war.", + }, + "schema": { + "properties": { + "caption": { + "type": "string", + "description": "A short description of the song to create" + } + }, + "type": "object" + } + } + }, + "required": true + }, + "tags": [ + "api/extra" + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": + { + "caption": "A melancholic and narrative-driven rap track built around a heavy beat", + "lyrics": "\n[Verse 1]\nKobold is love, yeah, kobold is life\nKobold is the only way we survive\nShe said okay, yo, keep it that way\nIn kobold we trust, just kobold today\n\n[Chorus]\nKobold, kobold, we carry on now\nKobold, kobold, each way and how\nKobold, kobold, right here we go\nKobold, kobold, all that I know.\n\n[Outro]", + "bpm": 120, + "duration": 64.0, + "keyscale": "G minor", + "timesignature": "2", + "vocal_language": "en", + "task_type": "text2music", + "seed": 622315, + "thinking": false, + "lm_temperature": 0.85, + "lm_cfg_scale": 2.0, + "lm_top_p": 0.9, + "lm_negative_prompt": "", + "inference_steps": 8, + "guidance_scale": 1.0, + "shift": 3.0, + "audio_codes": "" + }, + "schema": { + "properties": {}, + "type": "object" + } + } + }, + "description": "Successful request" + } + }, + } + }, + "/api/extra/music/generate": { + "post": { + "summary": "Generates music based on provided captions, lyrics and configurations", + "description": "Generates music based on provided captions, lyrics and configurations. The config can be generated using /api/extra/music/prepare or crafted manually", + "requestBody": { + "content": { + "application/json": { + "example": { + "caption": "A melancholic and narrative-driven rap track built around a heavy beat", + "lyrics": "\n[Verse 1]\nKobold is love, yeah, kobold is life\nKobold is the only way we survive\nShe said okay, yo, keep it that way\nIn kobold we trust, just kobold today\n\n[Chorus]\nKobold, kobold, we carry on now\nKobold, kobold, each way and how\nKobold, kobold, right here we go\nKobold, kobold, all that I know.\n\n[Outro]", + "bpm": 120, + "duration": 64.0, + "keyscale": "G minor", + "timesignature": "2", + "vocal_language": "en", + "inference_steps": 8 + }, + "schema": { + "properties": { + "caption": { + "type": "string", + "description": "A short description of the song to create" + }, + "lyrics": { + "type": "string", + "description": "The full lyrics of the song to generate" + }, + "bpm": { + "type": "number", + "description": "The song Beats Per Minute" + }, + "duration": { + "type": "number", + "description": "The length of the song, in seconds." + }, + "keyscale": { + "type": "string", + "description": "The musical key of the song." + }, + "timesignature": { + "type": "string", + "description": "The musical time signature of the song." + }, + "vocal_language": { + "type": "string", + "description": "The language of the song lyrics." + }, + "inference_steps": { + "type": "number", + "description": "How many diffusion steps to use." + } + }, + "type": "object" + } + } + }, + "required": true + }, + "tags": [ + "api/extra" + ], + "responses": { + "200": { + "content": { + "audio/wav": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "description": "Successful request" + } + }, + } + }, "/api/extra/json_to_grammar": { "post": { "summary": "Converts a provided JSON schema into GBNF grammar.", diff --git a/embd_res/kcpp_musicui.embd b/embd_res/kcpp_musicui.embd index d2beacc40..3d0e196c5 100644 --- a/embd_res/kcpp_musicui.embd +++ b/embd_res/kcpp_musicui.embd @@ -23,7 +23,7 @@ body{ color:var(--text); } header{ - padding:16px 20px; + padding:16px 12px; font-size:20px; font-weight:600; background:rgba(0,0,0,0.3); @@ -32,8 +32,8 @@ header{ .wrapper{ display:grid; grid-template-columns:minmax(340px,500px) 1fr; - gap:20px; - padding:20px; + gap:14px; + padding:10px; } @media(max-width:1100px){ .wrapper{grid-template-columns:1fr;} @@ -45,7 +45,7 @@ header{ box-shadow:0 10px 40px rgba(0,0,0,.4); } h2{ - margin:0 0 14px 0; + margin:0 0 10px 0; font-size:16px; color:var(--accent2); } @@ -112,7 +112,7 @@ button{ audio{width:100%;margin-top:6px;} .advanced-toggle{ margin-top:8px; - font-size:12px; + font-size:14px; cursor:pointer; color:var(--accent2); } @@ -174,11 +174,11 @@ input[type="checkbox"] {
Click 'Plan' first to generate lyrics, BPM and duration. Edit as needed.
+
When satisfied, click 'Generate' to make the music