MCPcopy Create free account
hub / github.com/evilsocket/cake / run_master_audio

Function run_master_audio

cake-cli/src/main.rs:329–361  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

327
328#[cfg(feature = "master")]
329async fn run_master_audio(ctx: Context) -> Result<()> {
330 #[cfg(feature = "vibevoice")]
331 {
332 let model_path = utils::hf::ensure_model_downloaded(&ctx.args.model)?;
333 let config_path = model_path.join("config.json");
334
335 // Detect model variant from config.json model_type
336 let config_str = std::fs::read_to_string(&config_path)?;
337 let model_type: String = serde_json::from_str::<serde_json::Value>(&config_str)?
338 .get("model_type")
339 .and_then(|v| v.as_str())
340 .unwrap_or("vibevoice_streaming")
341 .to_string();
342
343 println!("[VibeVoice] Model type: {model_type}");
344
345 match model_type.as_str() {
346 "vibevoice" => {
347 // VibeVoice-1.5B (non-streaming)
348 run_vibevoice_1_5b(ctx, &model_path, &config_path).await
349 }
350 _ => {
351 // VibeVoice-Realtime-0.5B (streaming)
352 run_vibevoice_0_5b(ctx, &model_path, &config_path).await
353 }
354 }
355 }
356 #[cfg(not(feature = "vibevoice"))]
357 {
358 let _ = ctx;
359 anyhow::bail!("vibevoice feature not enabled")
360 }
361}
362
363#[cfg(feature = "master")]
364#[cfg(feature = "vibevoice")]

Callers 1

run_masterFunction · 0.85

Calls 4

ensure_model_downloadedFunction · 0.85
run_vibevoice_1_5bFunction · 0.85
run_vibevoice_0_5bFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected