Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
90a8758
chore: Update `.gitignore` to include additional folders (`node_modul…
metaphorics Jun 21, 2025
47eb5b3
feat: Introduce configurable chunking and adaptive VAD for audio proc…
metaphorics Jun 21, 2025
3ab770b
feat: Add Boxed Predictor support and dynamic VAD selection for chunking
metaphorics Jun 21, 2025
10353c7
feat: Add README for `chunker` crate and improve VAD selection handling
metaphorics Jun 21, 2025
38a93de
feat: Improve chunking logic and enhance Silero VAD support
metaphorics Jun 21, 2025
ca37e76
chore: fix formattings
metaphorics Jun 21, 2025
2637506
Update crates/chunker/src/stream.rs
metaphorics Jun 21, 2025
92229df
fix: Adjust `trim_window_size` and optimize silence trimming logic
metaphorics Jun 21, 2025
05b962b
chore: Update `.gitignore` to include additional folders (`node_modul…
metaphorics Jun 21, 2025
7b79dfd
feat: Introduce configurable chunking and adaptive VAD for audio proc…
metaphorics Jun 21, 2025
ca0a987
feat: Add Boxed Predictor support and dynamic VAD selection for chunking
metaphorics Jun 21, 2025
72f6e37
feat: Add README for `chunker` crate and improve VAD selection handling
metaphorics Jun 21, 2025
9ec050e
feat: Improve chunking logic and enhance Silero VAD support
metaphorics Jun 21, 2025
a6a26ca
chore: fix formattings
metaphorics Jun 21, 2025
03be2a3
Update crates/chunker/src/stream.rs
metaphorics Jun 21, 2025
3dd58e3
fix: Adjust `trim_window_size` and optimize silence trimming logic
metaphorics Jun 21, 2025
2c8f174
feat: Improve embedding logic, silence trimming, and dependency updates
metaphorics Jun 21, 2025
f5b3bd3
chore: fix formattings
metaphorics Jun 21, 2025
63df264
feat: Enhance Silero VAD support and adjust thresholds
metaphorics Jun 21, 2025
2f5e6f6
chore: specify `bash` in code block for Rust guidelines
metaphorics Jun 21, 2025
75eb9f3
feat: Improve mutex error handling and enhance environment variable p…
metaphorics Jun 21, 2025
8a3e248
chore: fix fmt
metaphorics Jun 21, 2025
920c9af
feat: Introduce hallucination prevention levels and energy-based sile…
metaphorics Jun 21, 2025
521d76e
feat: Add smart chunking with advanced speech detection and spectral …
metaphorics Jun 21, 2025
996916f
feat: Optimize spectral analysis with FFT and improve real-time perfo…
metaphorics Jun 21, 2025
0c5ddc4
feat: Refactor silence trimming and enhance predictor configuration
metaphorics Jun 21, 2025
76d89ee
chore: Add confidence decay constants and modularize thresholds
metaphorics Jun 22, 2025
2c6054f
refactor: Extract predictor creation into a reusable helper function
metaphorics Jun 22, 2025
3d40425
refactor: Improve VAD speech likelihood handling and enhance speech q…
metaphorics Jun 22, 2025
44b821e
refactor: Improve small chunk handling and VAD confidence updates
metaphorics Jun 22, 2025
8c7c261
chore: Add `.cursor` rules for project structure, code style, and dev…
metaphorics Jun 22, 2025
eae0e9c
chore: Update Rust style guidelines and audio processing rules
metaphorics Jun 22, 2025
8e3b2c9
chore: Expand review guidelines and update development commands
metaphorics Jun 22, 2025
7d9898f
fix: Support compilation on both Windows/Linux
metaphorics Jun 22, 2025
e25c1d2
fix: Adjust macOS-specific integrations in `apple-calendar` plugin
metaphorics Jun 22, 2025
8b4e19c
refactor: Simplify macOS audio permission checks and calendar event h…
metaphorics Jun 22, 2025
c79ff8d
Update .serena/project.yml
metaphorics Jun 22, 2025
0bd3841
fix: Use `spawn_blocking` for macOS calendar operations to improve as…
metaphorics Jun 22, 2025
c0adb27
add reporter for debug
yujonglee Jun 22, 2025
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
7 changes: 7 additions & 0 deletions .aiignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# An .aiignore file follows the same syntax as a .gitignore file.
# .gitignore documentation: https://git-scm.com/docs/gitignore
# Junie will ask for explicit approval before view or edit the file or file within a directory listed in .aiignore.
# Only files contents is protected, Junie is still allowed to view file names even if they are listed in .aiignore.
# Be aware that the files you included in .aiignore can still be accessed by Junie in two cases:
# - If Brave Mode is turned on.
# - If a command has been added to the Allowlist — Junie will not ask for confirmation, even if it accesses - files and folders listed in .aiignore.
51 changes: 47 additions & 4 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,53 @@ reviews:
high_level_summary: false
collapse_walkthrough: true
path_instructions:
- path: "**/*.{js,ts,tsx,rs}"
- path: "**/*.{js,ts,tsx}"
instructions: |
1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".
TypeScript/React Review Guidelines:
1. Ensure proper error handling with try-catch blocks or error boundaries
2. Check for unused imports, variables, or functions
3. Verify TypeScript strict mode compliance
4. Validate proper use of React hooks (dependencies, cleanup)
5. Check for performance issues (unnecessary re-renders, missing memoization)
6. Ensure consistent use of functional components
7. Verify proper async/await usage and promise handling
8. Check for accessibility concerns in UI components
9. Comments should explain "why" not "what" - remove obvious comments
10. Ensure consistent naming: kebab-case files, PascalCase components

- path: "**/*.rs"
instructions: |
Rust Review Guidelines:
1. Ensure proper error handling with Result/Option types
2. Check for clippy warnings and suggest fixes
3. Verify memory safety and absence of unnecessary unsafe blocks
4. Check for proper use of lifetimes and borrowing
5. Ensure efficient use of iterators over manual loops
6. Verify proper async/await usage with Tokio
7. Check for appropriate use of Arc/Mutex in concurrent code
8. Ensure consistent error types using thiserror
9. Verify proper use of tracing for logging
10. Comments should explain "why" not "what"
11. Check adherence to Rust Style Guide (enforced by rustfmt)
12. Verify performance-critical paths use appropriate optimizations

- path: "**/crates/audio/**/*.rs"
instructions: |
Audio Processing Specific:
1. Verify real-time constraints are met (no blocking operations)
2. Check for proper buffer management and zero-copy where possible
3. Ensure platform-specific code is properly feature-gated
4. Verify sample rate conversions are handled correctly
5. Check for potential audio artifacts or discontinuities

- path: "**/plugins/**/*.rs"
instructions: |
Tauri Plugin Specific:
1. Ensure commands are properly exposed with #[tauri::command]
2. Verify error types are serializable for IPC
3. Check for proper permission handling
4. Ensure TypeScript bindings will generate correctly
5. Verify async commands use proper runtime handling

chat:
auto_reply: false
70 changes: 70 additions & 0 deletions .cursor/rules/audio-processing.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
description: Audio processing pipeline patterns and best practices
globs:
- "crates/audio/**/*.rs"
- "crates/chunker/**/*.rs"
- "crates/vad/**/*.rs"
- "crates/aec/**/*.rs"
- "crates/denoise/**/*.rs"
- "crates/stt*/**/*.rs"
alwaysApply: false
---

# Audio Processing Pipeline

## Architecture Overview
Real-time audio capture → VAD → Echo cancellation → Chunking → STT

## Key Components

### Audio Capture (`crates/audio/`)
- Platform-specific implementations:
- macOS: CoreAudio
- Windows: WASAPI
- Linux: ALSA
- Zero-copy operations for performance
- Stream-based processing

### Voice Activity Detection (`crates/vad/`)
- Silero VAD with ONNX runtime
- Minimum 480 samples (30ms at 16kHz) requirement
- Confidence thresholds based on speech physics

### Audio Chunking (`crates/chunker/`)
- SmartPredictor for advanced feature analysis
- Multi-feature fusion: VAD + Speech Quality + SNR
- Fallback chain: SmartPredictor → Silero → RMS

### Echo Cancellation (`crates/aec/`, `crates/aec2/`)
- Multiple AEC implementations
- Real-time processing requirements

### Speech-to-Text (`crates/stt*`)
- Unified interface in `crates/stt/`
- Multiple backends (Local-first for privacy):
- Local: Whisper (with Metal/CUDA acceleration)
- Stream-based transcription

## Performance Guidelines
- Use stream processing for real-time data
- Avoid memory allocations in hot paths
- Platform-specific SIMD optimizations
- ONNX GraphOptimizationLevel::Level3
- Chunk-based processing for long sessions

## Error Handling Patterns
```rust
#[derive(thiserror::Error, Debug)]
pub enum AudioError {
#[error("Buffer underrun")]
BufferUnderrun,

#[error("Device not available: {0}")]
DeviceError(String),
}
```

## Testing Considerations
- Use `serial_test` for audio device tests
- Mock audio streams for unit tests
- Integration tests with sample audio files
Loading
Loading