Commit f3b5cbd
authored
feat: add offline voice-to-text with Whisper and UI improvements (#2)
* fix(voice-to-text): resolve 4 critical bugs in recording
- Add single-instance detection to prevent duplicate tray icons
- Implement window lifecycle management (hide instead of destroy)
- Add microphone permission validation and audio stream checking
- Move command invocation to Rust for global shortcut independence
Fixes issues: global shortcut only working with window open, window
not reopening after close, CLI creating duplicate instances, and
blank audio transcription with model loaded.
* build: add http-server for Tauri dev mode
- Add http-server dependency for serving static files
- Configure beforeDevCommand to auto-start dev server
- Remove center positioning from recording window
* feat(voice-to-text): implement audio device selection backend
- Add list_audio_devices() to enumerate available microphones
- Modify AudioRecorder to accept device_name parameter
- Add RMS validation (threshold 0.001) to detect silent audio
- Add 50ms delay before stopping stream to prevent sample loss
- Persist selected device in WhisperSettings
- Add Tauri commands: list_audio_devices, set_audio_device
- Add window permissions: allow-hide, allow-show, allow-set-focus
- Restore onCloseRequested behavior for minimize-to-tray
* feat(voice-to-text): add audio device selection UI
- Add microphone dropdown in Settings modal
- Load and display available audio devices
- Persist device selection on change
- Add CSS styling for device selector
- Add diagnostic logging for window close handlers
* feat(voice-to-text): add recording modes and clipboard integration
- Add button mode and shortcut mode for recording
- Add cancel_recording command for better control
- Add write_clipboard command for transcription results
- Add long_recording_threshold setting (default 60s)
- Enable macOS private API for better integration
- Update recording window size and config
* refactor(ui): reorganize toolbar layout and add close file button
- Simplify toolbar to horizontal layout (file name on left, actions on right)
- Add close file button (X) next to filename
- Remove 'Arandu' label from toolbar for cleaner look
- Add components.css for reusable component styles
- Improve toolbar spacing and button consistency
- Add closeFile() function to clear current file state
* refactor(tray): update icon to match Arandu logo style
- Replace horizontal bar with diamond/losango shape
- Make apex more pointed (sharper top)
- Use thinner stroke for refined appearance
- Icon now matches the Arandu logo design
* fix(ui): clear comments state when closing file
- Reset selectedBlocks and commentsData
- Hide bottom-bar (comments panel)
- Hide stale comments banner
- Prevents UI state from persisting after file close
* fix(ui): restore refresh button padding
- Revert padding from merge conflict resolution
- Keep consistent with other toolbar buttons
* ci(auto-tag): skip tag creation for docs-only changes
- Check if apps/shared/scripts changed before creating tag
- Skip release build for website/README updates only
- Reduces unnecessary CI runs and costs
* chore(deps): update Cargo.lock from merge
* fix: address CodeRabbit review feedback on PR #2
- Guard against invalid stored shortcuts with fallback to default
- Validate shortcut before unregistering previous binding
- Add HTTP status validation in model download
- Propagate transcriber segment text errors instead of silently dropping
- Remove unreliable empty beforeBuildCommand from tauri.conf.json
- Fix bottom bar visibility using class toggling instead of inline style
- Wire setRecordingState() into all recording event listeners
- Add recording-error handler and resetRecordingUi() in recording window
- Clear timer on Cancel/Escape to prevent orphaned intervals
- Extract duplicated window focus logic into show_main_window helper
- Release recorder mutex before calling stop() to avoid blocking
- Update AudioRecorder safety comment with cpal version constraint
- Rename dirs_next() to home_dir() in cli_installer
- Include release-tauri.yml in auto-tag grep pattern
* fix: address second round of CodeRabbit review comments
- Handle repos without v* tag in auto-tag workflow using git ls-tree
- Fix duration log using wrong sample rate before resampling
- Validate long-recording threshold input (NaN/negative)
- Replace innerHTML with safe DOM creation for device options
* fix: prevent XSS in model list and fix shortcut label formatting
- Replace innerHTML with createElement + textContent for model info
- Use replaceAll to remove all '+' from shortcut labels (Ctrl+Alt+Space)
* fix(ui): auto-focus shortcut input when entering recording mode1 parent b5417a2 commit f3b5cbd
21 files changed
Lines changed: 3578 additions & 91 deletions
File tree
- .github/workflows
- apps/tauri
- src-tauri
- capabilities
- src
- whisper
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
| 38 | + | |
19 | 39 | | |
20 | 40 | | |
21 | 41 | | |
| |||
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
67 | | - | |
| 87 | + | |
68 | 88 | | |
69 | 89 | | |
70 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments