Fans out single audio generation request to N parallel generation tasks, collects results.
// Source: https://github.com/gabotechs/MusicGPT | License: MIT | Copyright 2024 Gabriel Musat
// Provided via justclaw.it.com; keep this notice with the code.
use serde::{Deserialize, Serialize};
use specta::Type;
use tracing::info;
use uuid::Uuid;
use crate::audio::AudioManager;
use crate::backend::audio_generation_backend::BackendOutboundMsg;
use crate::backend::music_gpt_chat::ChatEntry;
use crate::backend::music_gpt_ws_handler::IdPair;
use crate::storage::Storage;
#[derive(Clone, Debug, Type, Serialize, Deserialize)]
pub struct AudioGenerationStart {
pub id: Uuid,
pub chat_id: Uuid,
pub prompt: String,
pub secs: usize,
}
#[derive(Clone, Debug, Type, Serialize, Deserialize)]
pub struct AudioGenerationProgress {
pub id: Uuid,
pub chat_id: Uuid,
pub progres
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key