Commit graph

22 commits

Author SHA1 Message Date
Marcelo Terreiro Prado
f6e71862ff
fix: show friendly error when no audio input device is available (#1115) 2026-03-23 07:53:55 +08:00
Fero
17277cf6ce
Save recordings before transcription (#1024)
* save recordings before transcription

* impart cj preferences

* cleanup

* re-transcribe anything

* format

* fix tests

* format

* ui cleanup

* format

* cleanup

* bunch of fixes, mainly for vm

* put comments back

* update transcription failure text

* alert -> toast

* spawn_blocking

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-03-22 15:43:02 +08:00
Viren Mohindra
0b3322faf3
feat(audio): use device default sample rate and always downsample (#1084)
* feat(audio): use device default sample rate and always downsample

instead of forcing the microphone to open at 16kHz (which can cause
issues with bluetooth codecs, some ALSA drivers, and other devices
that advertise 16kHz support but produce suboptimal audio), use the
device's native/default sample rate and let the existing FrameResampler
downsample to 16kHz for the whisper pipeline.

the resampling infrastructure (rubato FftFixedIn) already exists in
run_consumer() and short-circuits when in_hz == out_hz, so devices
that natively default to 16kHz are unaffected.

* fix: graceful fallback when supported_input_configs fails

some ALSA/PipeWire drivers support default_input_config but have
a broken supported_input_configs implementation. fall back to the
default config instead of propagating the error. also add a warn
log when no config matches the device's default rate.
2026-03-19 08:53:03 +08:00
CJ Pais
f45ad97e51
ensure samples don't get dropped (#1043)
* ensure samples don't get dropped

* format
2026-03-16 08:47:00 +08:00
Fero
a6e8fc8651
fix: keep Windows microphone guidance Windows-only (#1032)
* fix windows-only mic permission guidance

* don't hardcode error strings in rust

* format

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-03-15 22:44:48 +08:00
Fero
785c3317e4
Handle microphone init failure without aborting (#945)
* Handle microphone start failures without aborting

Return recorder init errors instead of panicking/aborting in the worker thread and reset UI state when recording start fails.

Refs #436

* prop errors to ui

* format

* Add missing recording error translation keys

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-03-10 13:07:21 +08:00
CJ Pais
615b3c93bb
feat: language-aware filler word removal (#971)
* Remove filler words that conflict with European languages

Removed three filler words from the transcription filter that are actual
words in European languages:

- 'um' - Portuguese/Spanish indefinite article meaning 'a/an' (masculine)
  Example: Portuguese 'Isto é um teste' (This is a test)
  Removing this was breaking Portuguese transcriptions

- 'ha' - Spanish/Italian/Norwegian/Swedish auxiliary verb meaning 'has/have'
  Example: Spanish 'Él ha comido' (He has eaten)
  This is a very common verb form in Romance and Scandinavian languages

- 'eh' - Italian interjection and Canadian English discourse marker
  While less critical, this can appear in legitimate Italian speech

The remaining filler words are primarily English
vocalized hesitations that don't conflict with common words in other
European languages.

Updated tests to use 'uhm' instead of 'um' where needed.

Fixes #941

* customize list

---------

Co-authored-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
2026-03-06 20:24:29 +08:00
CJ Pais
3c0fb95185
drain audio (#838) 2026-02-19 10:32:30 +08:00
Stefano Verna
7703d10f5f
feat(text): Add n-gram matching for multi-word custom word correction (#711)
* feat(text): Add n-gram matching for multi-word custom word correction

Improves custom word matching to handle speech artifacts where a single
word gets transcribed as multiple words (e.g., "Charge B" -> "ChargeBee",
"Chat G P T" -> "ChatGPT").

- Implements greedy n-gram matching (3 to 1 words) for better accuracy
- Adds length-based filtering (25% max difference) to prevent over-matching
- Extracts matching logic into reusable find_best_match function
- Preserves punctuation and case from original transcription
- Adds comprehensive test coverage for n-gram scenarios

* minor tweak

* format

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-02-05 18:29:25 +08:00
Prasad Chalasani
c84e863423
feat: add automatic filler word removal from transcriptions (#589)
* feat: add automatic filler word removal from transcriptions

Add filter_transcription_output() that removes filler words (uh, um, hmm,
etc.) and hallucination patterns ([AUDIO], (pause), <tag>...</tag>) from
transcriptions. Inspired by VoiceInk's approach.

- Add regex-based filter in audio_toolkit/text.rs
- Integrate into transcription pipeline after custom word correction
- Add comprehensive tests for filler word removal
- Add regex crate dependency

* feat: collapse repeated 1-2 letter stutters in transcriptions

Add collapse_stutters() to reduce model hallucination artifacts like
"wh wh wh wh wh why" -> "wh why" or "I I I I think" -> "I think".

Collapses any 1-2 letter word that repeats 3+ times consecutively
to a single instance (case-insensitive matching).

* remove bracket/xml stuff

* format

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-01-18 10:52:39 +08:00
mg-dev25
244a99e623
feat(audio): prioritize F32 sample format for better quality (#390) (#393) 2025-11-30 15:59:54 +07:00
CJ Pais
18536aa81e
Add file based debug logging (#347)
* add basic logging to handy

* 100kb of logs

* add open button to the ui for logs

* use log everywhere

* some minor cleanup

* finish debug logging
2025-11-17 12:55:24 +07:00
Jackson
eb044d8810
Slight overlay UI fix for flickering (#231) 2025-10-23 10:35:31 -07:00
CJ Pais
9ff3f12ce0 fix warning 2025-10-09 10:58:23 -07:00
CJ Pais
d602a3a8e2
use alsa by default on linux (#190)
* use alsa by default on linux

* only import trait when needed
2025-10-08 17:47:10 -07:00
CJ Pais
45a473dc9f
Parakeet V3 (#111)
* wip: model manager support for parakeet

* working parakeet??git status

* Update LanguageSelector.tsx

* Use the published version of the crate.

* move word correction into audio toolkit
2025-09-09 18:33:57 -07:00
CJ Pais
7638f6b827
basic working history (#104) 2025-09-05 16:25:38 -07:00
CJ Pais
ec2fefb9fe Audio visualizer generally working nicely. 2025-08-01 14:15:02 -07:00
CJ Pais
c6560bd6cb add u8 sample format 2025-07-18 18:11:28 -07:00
CJ Pais
dc90edadb1 Add hysteresis to VAD. 2025-07-11 15:40:47 -07:00
CJ Pais
c23befd98a big refactor of settings + switch audio devices 2025-07-10 21:10:46 -07:00
CJ Pais
59541b8ec4 move audio toolkit into src-tauri to fix permissions 2025-07-10 12:38:06 -07:00