Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion assistant_v2/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -290,7 +294,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
Voice::Echo,
opt.speech_speed,
opt.tick,
opt.duck_ptt,
opt.duck,
)));

let (audio_tx, audio_rx) = flume::unbounded();
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
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();
}
Expand Down
4 changes: 4 additions & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading