diff --git a/assistant_v2/src/main.rs b/assistant_v2/src/main.rs index 75eed70..addf8a9 100644 --- a/assistant_v2/src/main.rs +++ b/assistant_v2/src/main.rs @@ -42,6 +42,10 @@ struct Opt { #[arg(long, default_value_t = false)] tick: bool, + /// Enable audio ducking while the assistant is speaking. + #[arg(long, default_value_t = false)] + duck: bool, + /// Enable audio ducking while the push-to-talk key is held. #[arg(long, default_value_t = false)] duck_ptt: bool, @@ -290,7 +294,7 @@ async fn main() -> Result<(), Box> { Voice::Echo, opt.speech_speed, opt.tick, - opt.duck_ptt, + opt.duck, ))); let (audio_tx, audio_rx) = flume::unbounded(); diff --git a/src/main.rs b/src/main.rs index fe7c04e..6bcbb45 100644 --- a/src/main.rs +++ b/src/main.rs @@ -976,7 +976,7 @@ async fn main() -> Result<(), Box> { Some(voice) => voice.into(), None => Voice::Echo, }; - let mut speak_stream = ss::SpeakStream::new(ai_voice, opt.speech_speed, opt.tick, true); + let mut speak_stream = ss::SpeakStream::new(ai_voice, opt.speech_speed, opt.tick, opt.duck); if opt.mute { speak_stream.mute(); } diff --git a/src/options.rs b/src/options.rs index 0db34cb..2808538 100644 --- a/src/options.rs +++ b/src/options.rs @@ -32,6 +32,10 @@ pub struct Opt { #[arg(long)] pub tick: bool, + /// Duck other application audio while the assistant is speaking. + #[arg(long)] + pub duck: bool, + /// Duck other application audio while the push-to-talk key is held down. #[arg(long)] pub duck_ptt: bool,