Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1f13d62
feat(commands): add 'Hey Vox' trigger, real-time command detection, a…
JRufer Sep 24, 2026
8c97721
feat(commands): add "Hey Vox" trigger keyword
JRufer Sep 24, 2026
187eec5
feat(tts): start TTS model loads earlier without loading at every sta…
JRufer Sep 24, 2026
973b5c3
feat(overlay): never show the target visualizer over SYSTEM RESPONDING
JRufer Sep 24, 2026
29ab1f8
Revert "feat(commands): add 'Hey Vox' trigger, real-time command dete…
JRufer Sep 24, 2026
ebcc500
test(routing): mock wl-copy in the empty-text clipboard test
JRufer Sep 24, 2026
4e47af3
feat(overlay): recording takes priority over SYSTEM RESPONDING; keep …
JRufer Sep 24, 2026
3956b8a
Bump version to 0.7.0
JRufer Sep 24, 2026
0b03fda
test(overlay): answer the status poll with the test's own status
JRufer Sep 24, 2026
99225af
Merge pull request #147 from JRufer/feat/hey-vox-trigger
JRufer Sep 24, 2026
542f995
feat(commands): detect voice commands while the user is still speaking
JRufer Sep 24, 2026
62f8997
feat(commands): withdraw unconfirmed early commands; setting to turn …
JRufer Sep 24, 2026
362b37a
Merge pull request #148 from JRufer/feat/interim-command-detection
JRufer Sep 24, 2026
8ead838
feat(pipeline): skip S1-mini cleanup for text bound for Speak targets
JRufer Sep 24, 2026
f557e06
Merge pull request #149 from JRufer/feat/speak-skip-s1-mini
JRufer Sep 24, 2026
12ea455
Merge pull request #150 from JRufer/feat/tts-preload
JRufer Sep 24, 2026
4b73e11
Merge pull request #151 from JRufer/feat/overlay-exclusivity
JRufer Sep 24, 2026
e9bf19f
Merge pull request #152 from JRufer/fix/clipboard-test-real-wl-copy
JRufer Sep 24, 2026
1e3ab01
Merge pull request #153 from JRufer/release-v0.7.0
JRufer Sep 24, 2026
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
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.6.5"
version = "0.7.0"
edition = "2021"
authors = ["VoxCtrl Contributors"]
license = "MIT"
Expand Down
24 changes: 23 additions & 1 deletion crates/voxctrl-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,28 @@ pub struct FeaturesConfig {
pub show_notification: Option<bool>,
/// Map of trigger → expansion, e.g. {"addr" → "123 Main St"}
pub snippets: std::collections::HashMap<String, String>,
/// Transcribe the opening seconds of a recording while it is still going,
/// so a spoken voice command shows its overlay and starts loading the TTS
/// model before the user releases the hotkey. Costs some extra
/// transcription work at the start of each recording.
#[serde(default = "default_early_command_detection")]
pub early_command_detection: bool,
}

fn default_early_command_detection() -> bool {
true
}

impl Default for FeaturesConfig {
fn default() -> Self {
Self {
remove_fillers: true,
custom_vocabulary: vec!["VoxCtrl".into()],
custom_vocabulary: vec!["VoxCtrl".into(), "Hey Vox".into()],
spoken_punctuation: true,
auto_format_lists: true,
show_notification: None,
snippets: std::collections::HashMap::new(),
early_command_detection: true,
}
}
}
Expand Down Expand Up @@ -1647,4 +1658,15 @@ mod tests {

serde_json::from_str::<AppConfig>(&with_leftover).expect("older configs must still load");
}

#[test]
fn early_command_detection_defaults_on_for_older_configs() {
use super::FeaturesConfig;
let features: FeaturesConfig = serde_json::from_str(
r#"{"remove_fillers": true, "custom_vocabulary": [], "spoken_punctuation": true,
"auto_format_lists": true, "snippets": {}}"#,
)
.unwrap();
assert!(features.early_command_detection);
}
}
42 changes: 39 additions & 3 deletions crates/voxctrl-inference/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ pub struct InferenceRequest {
pub target_id: String,
/// Hotkey binding ID (if triggered by a hotkey)
pub binding_id: Option<String>,
/// Whether this is an intermediate/live transcription during active speech
pub is_interim: bool,
/// Unique session identifier for the recording turn
pub session_id: u64,
}

/// Final output after transcription + post-processing.
Expand All @@ -239,6 +243,8 @@ pub struct InferenceOutput {
/// Set when transcription failed (model missing, backend error, ...). The
/// UI layer surfaces this to the user; `text` is empty in that case.
pub error: Option<String>,
pub is_interim: bool,
pub session_id: u64,
}

// ── Engine ────────────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -293,6 +299,9 @@ impl InferenceEngine {

/// Transcribe and post-process. Returns the final text.
pub fn process(&self, req: InferenceRequest) -> Result<InferenceOutput> {
let is_interim = req.is_interim;
let session_id = req.session_id;

if req.audio.is_empty() {
return Ok(InferenceOutput {
text: String::new(),
Expand All @@ -302,6 +311,8 @@ impl InferenceEngine {
inference_ms: 0,
language: "en".into(),
error: None,
is_interim,
session_id,
});
}

Expand Down Expand Up @@ -345,13 +356,15 @@ impl InferenceEngine {
inference_ms: 0,
language: "en".into(),
error: None,
is_interim,
session_id,
});
}

let dir = voxctrl_routing::config_dir();
let targets = voxctrl_routing::load_targets(&dir).unwrap_or_default();

let mut merged_prompt = String::from("VoxCtrl is a voice control assistant application. VoxCtrl commands start with VoxCtrl. ");
let mut merged_prompt = String::from("VoxCtrl is a voice control assistant application. VoxCtrl commands start with Vox Control or Hey Vox. ");

// Custom vocabulary words from features config
if !app_config.features.custom_vocabulary.is_empty() {
Expand Down Expand Up @@ -400,7 +413,10 @@ impl InferenceEngine {
.and_then(|b| b.openai_enabled)
.unwrap_or(false);

if binding_wants_openai && !processed.is_empty() {
// Interim passes only feed the voice-command trigger check and are
// thrown away; running the hotkey's (billed, slow) OpenAI rewrite on
// every one of them would cost a request per pass for nothing.
if binding_wants_openai && !is_interim && !processed.is_empty() {
// Re-read the OpenAI settings from disk so changes made in the
// Settings UI (model, endpoint, API key, prompts) take effect without
// restarting the app. Targets and bindings above are already hot-read
Expand Down Expand Up @@ -477,6 +493,8 @@ impl InferenceEngine {
inference_ms: result.inference_ms,
language: result.language,
error: None,
is_interim,
session_id,
})
}

Expand Down Expand Up @@ -616,11 +634,25 @@ pub fn run_worker_with_config(
loop {
crossbeam_channel::select! {
recv(rx) -> req_res => {
let req = match req_res {
let mut req = match req_res {
Ok(r) => r,
Err(_) => break,
};

// If an interim request arrived, drain any newer requests already in the queue
// to prioritize fresher audio or the final release request.
if req.is_interim {
while let Ok(newer) = rx.try_recv() {
req = newer;
if !req.is_interim {
break;
}
}
}

let is_interim = req.is_interim;
let session_id = req.session_id;

if !loaded {
match engine.load() {
Ok(()) => {
Expand All @@ -637,6 +669,8 @@ pub fn run_worker_with_config(
inference_ms: 0,
language: String::new(),
error: Some(format!("{e:#}")),
is_interim,
session_id,
});
continue;
}
Expand All @@ -657,6 +691,8 @@ pub fn run_worker_with_config(
inference_ms: 0,
language: "".to_string(),
error: Some(format!("{e:#}")),
is_interim,
session_id,
});
}
}
Expand Down
Loading
Loading