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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.2.0

The owl picked up a few new tricks. 🦉✨ Whisper transcripts can now take a quick detour through your favorite local LLM to get cleaned up, summarized, or remixed before they land in your app.

- Added an opt-in LLM post-processing engine with a local-only HTTP client, presets for formatting or summarizing, and full custom prompt support.
- Expanded Settings with a dedicated LLM tab: configure base URL/model, control auto-paste behavior, and inspect recent history saved to disk.
- Published a new `llm-postprocess` guide and refreshed the manual so you can get up and running with Ollama, LM Studio, and friends.
- Trimmed unused diff logging code to keep builds leaner.

## v0.1.0

HootVoice takes the stage for the very first time — cue the confetti! 🎉
Expand Down
9 changes: 1 addition & 8 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hootvoice"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
authors = ["HootVoice Team"]
description = "HootVoice — High‑accuracy voice input (Whisper)"
Expand Down Expand Up @@ -42,7 +42,6 @@ serde_json = "1.0"
toml = "0.8"
serde_yaml = "0.9"
image = { version = "0.24", default-features = false, features = ["png", "jpeg"] }
similar = "2.6"

# GUI
egui = "0.32"
Expand Down
3 changes: 1 addition & 2 deletions assets/THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11085,7 +11085,7 @@ SOFTWARE.

Used by:

- hootvoice 0.1.0 (https://github.com/agata/hootvoice)
- hootvoice 0.2.0 (https://github.com/agata/hootvoice)

License text:

Expand Down Expand Up @@ -12691,4 +12691,3 @@ the following restrictions:

---


39 changes: 4 additions & 35 deletions src/core/postprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::llm::{
history_file_path, record_history, LlmPostProcessSettings, LlmPostProcessor,
MAX_HISTORY_ENTRIES,
};
use similar::{ChangeTag, TextDiff};
use std::sync::{Arc, Mutex};

pub struct PostProcessResult {
Expand Down Expand Up @@ -66,7 +65,7 @@ impl PostProcessEngine {

let mut final_text = base_text.to_string();
let mut llm_latency_secs = 0.0f32;
let mut llm_output_for_diff: Option<String> = None;
let mut llm_output_for_log: Option<String> = None;

let mut history_payload: Option<(String, bool, u128)> = None;
match self
Expand All @@ -93,7 +92,7 @@ impl PostProcessEngine {
&format!("[llm] Completed in {:.2}s.", llm_latency_secs),
);
log_message(log, &format!("[llm][output] {}", content));
llm_output_for_diff = Some(content.clone());
llm_output_for_log = Some(content.clone());
if snapshot.apply_to_autopaste {
final_text = content.clone();
} else {
Expand Down Expand Up @@ -144,41 +143,11 @@ impl PostProcessEngine {
}
}

if let Some(output_text) = llm_output_for_diff.as_ref() {
if let Some(output_text) = llm_output_for_log.as_ref() {
if output_text == base_text {
log_message(log, "[llm] Output identical to Whisper text.");
} else {
let diff = TextDiff::from_lines(base_text, output_text);
let mut diff_lines = Vec::new();
let mut truncated = false;
for change in diff.iter_all_changes() {
let prefix = match change.tag() {
ChangeTag::Delete => "-",
ChangeTag::Insert => "+",
ChangeTag::Equal => continue,
};
if diff_lines.len() >= 120 {
truncated = true;
break;
}
let mut line = change.value().trim_end_matches('\n').to_string();
if line.chars().count() > 200 {
let mut truncated = String::with_capacity(201);
truncated.extend(line.chars().take(200));
truncated.push_str("…");
line = truncated;
}
diff_lines.push(format!("{}{}", prefix, line));
}

if diff_lines.is_empty() {
log_message(log, "[llm] Output identical to Whisper text.");
} else {
if truncated {
diff_lines.push("... (diff truncated)".to_string());
}
log_message(log, &format!("[llm][diff]\n{}", diff_lines.join("\n")));
}
log_message(log, "[llm] Output differs from Whisper text.");
}
}

Expand Down
Loading