diff --git a/rust/moshi-backend/Cargo.toml b/rust/moshi-backend/Cargo.toml index e6df16c..f669159 100644 --- a/rust/moshi-backend/Cargo.toml +++ b/rust/moshi-backend/Cargo.toml @@ -56,3 +56,11 @@ vergen = { version = "8.3.1", features = ["build", "cargo", "git", "gitcl", "rus default = [] cuda = ["moshi/cuda", "candle/cuda", "candle-nn/cuda", "candle-transformers/cuda"] metal = ["moshi/metal", "candle/metal", "candle-nn/metal", "candle-transformers/metal"] + +[profile.release] +debug = true + +[profile.release-no-debug] +inherits = "release" +debug = false + diff --git a/rust/moshi-backend/src/benchmark.rs b/rust/moshi-backend/src/benchmark.rs index 701bbe0..f6bd202 100644 --- a/rust/moshi-backend/src/benchmark.rs +++ b/rust/moshi-backend/src/benchmark.rs @@ -131,8 +131,8 @@ pub async fn run(args: &crate::BenchmarkArgs, config: &Config) -> Result<()> { tokio::time::sleep_until(target_time).await; in_pcm_tx.send(zeros.to_vec())?; } - let _ = task.await; - let _ = w.await; + task.await?; + w.await??; } } Ok(()) diff --git a/rust/moshi-backend/src/main.rs b/rust/moshi-backend/src/main.rs index 6f88890..42a8879 100644 --- a/rust/moshi-backend/src/main.rs +++ b/rust/moshi-backend/src/main.rs @@ -51,6 +51,9 @@ pub struct BenchmarkArgs { #[clap(long)] chrome_tracing: bool, + #[clap(long)] + asr: bool, + #[clap(long)] mimi_only: bool, } diff --git a/rust/moshi-backend/src/standalone.rs b/rust/moshi-backend/src/standalone.rs index 56afbec..b953366 100644 --- a/rust/moshi-backend/src/standalone.rs +++ b/rust/moshi-backend/src/standalone.rs @@ -82,7 +82,7 @@ impl stream_both::AppStateInner { let codes = mimi_model.encode_step(&fake_pcm.into())?; let ys = mimi_model.decode_step(&codes)?; if ys.as_option().is_none() { - anyhow::bail!("Expected mimi to output some stuff, but nothing came out."); + anyhow::bail!("Expected Mimi to output some stuff, but nothing came out."); } device.synchronize()?; tracing::info!("model is ready to roll!"); diff --git a/rust/moshi-backend/src/stream_both.rs b/rust/moshi-backend/src/stream_both.rs index 11418a4..c983272 100644 --- a/rust/moshi-backend/src/stream_both.rs +++ b/rust/moshi-backend/src/stream_both.rs @@ -13,6 +13,7 @@ use std::sync::Arc; #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct Config { pub instance_name: String, + #[serde(default)] pub hf_repo: String, pub lm_model_file: String, pub log_dir: String,