Skip to content

Professional offline voice typing application powered by Faster-Whisper AI

License

Notifications You must be signed in to change notification settings

ai-dev-2024/sonu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SONU - Professional Offline Voice Typing

SONU Logo

SONU

🎀 Professional Offline Voice Typing Platform

Desktop Version Mobile Version License CI/CD

A complete offline voice typing solution for desktop and mobile.
No cloud. No subscriptions. 100% private.

Quick Start β€’ Features β€’ Installation β€’ Documentation β€’ Contributing


πŸ“± Applications

App Platform Tech Stack Status
SONU Desktop Windows, macOS, Linux Tauri + Rust + whisper.cpp βœ… v2.1.0
Voice AI Android Rust + whisper.cpp βœ… v1.2.1
SONU Desktop (Legacy) Windows Electron + Python πŸ—„οΈ v1.0.0

πŸ“Š State Diagram

stateDiagram-v2
    [*] --> Idle: App Launched
    
    Idle --> ModelLoading: Load Model
    ModelLoading --> Ready: Model Loaded
    
    Ready --> Recording: Hotkey Pressed
    Recording --> Processing: Hotkey Released
    
    Processing --> VAD: Audio Captured
    VAD --> Transcribing: Speech Detected
    VAD --> Ready: No Speech
    
    Transcribing --> Typing: Text Ready
    Typing --> Ready: Complete
Loading

✨ Key Features

Feature Description
πŸ”’ 100% Offline All processing stays on your device
πŸš€ Fast Optimized whisper.cpp for real-time transcription
🎯 Accurate OpenAI Whisper models (tiny to large-v3)
πŸ”‡ Smart VAD Filters silence automatically
⌨️ Auto-Type Pastes text into any application
🌍 Multi-Platform Desktop + Mobile support

πŸš€ Quick Start

Desktop (Windows/macOS/Linux)

# Navigate to Tauri app
cd apps/tauri-v2

# Install dependencies
npm install

# Run in development
npm run tauri dev

# Build for production
npm run tauri build

Mobile (Android)

# Navigate to mobile app
cd apps/mobile

# Build APK
./build.sh

πŸŽ‰ Recent Major Improvements (February 2026)

βœ… Complete 5-Phase Transformation

We recently completed a comprehensive transformation of the SONU codebase:

Phase 1: Critical Security & Error Handling

  • πŸ”’ Comprehensive Input Validation - Prevents injection attacks, path traversal
  • πŸ¦€ SafeLock System - Replaces all 77 dangerous .unwrap() calls
  • πŸ›‘οΈ API Key Validation - Secure storage with OS keychain integration
  • βœ… 40+ Unit Tests Added for validation and safety

Phase 2: Architecture Refactoring

  • πŸ“¦ main.js Refactored - 5,883 lines β†’ 200 lines (96% reduction)
  • πŸ—οΈ Modular Services - Window, typing, recording services separated
  • πŸ“„ Model Configs Extracted - Single source of truth in shared/config/models.json
  • πŸ—‘οΈ Removed Duplicates - Deleted handy-base (1,500+ duplicate lines)

Phase 3: Testing Infrastructure

  • πŸ§ͺ 40+ New Tests - Unit, integration, and E2E tests
  • 🎭 Playwright E2E - Full workflow testing
  • πŸ“Š Coverage Increased - From 7% to 40%+
  • βœ… All Tests Passing

Phase 4: Project Reorganization

  • πŸ“ Clean Structure - Organized by concern (main/, services/, utils/)
  • 🧹 Consolidated Assets - Unified icon and resource locations
  • πŸ“¦ Docker Support - Development and production containers
  • πŸ”§ Helper Scripts - setup.sh, test-all.sh, build.sh

Phase 5: Documentation & DevOps

  • πŸ“ 10+ New Docs - Complete guides and API references
  • πŸš€ CI/CD Pipeline - GitHub Actions with multi-platform builds
  • 🐳 Docker Compose - Full development environment
  • πŸ“š Brand Guidelines - Professional design system

πŸ“Š Impact Summary

Metric Before After Improvement
Code Quality B- A Critical fixes
Test Coverage 7% 40%+ +33%
main.js Size 5,883 lines ~200 lines -96%
Security Issues 8 critical 0 Fixed all
Documentation Basic Complete 10+ new docs
CI/CD None Full Multi-platform

See full details: IMPLEMENTATION_STATUS.md


⌨️ Keyboard Shortcuts

Shortcut Action
Alt (hold) Start/stop dictation (default, configurable)
Ctrl+Shift+D Toggle Debug Mode (shows advanced options)
Ctrl+/ Show keyboard shortcuts help
Escape Cancel current recording

Debug Mode

Press Ctrl+Shift+D to enable Debug Mode. This reveals:

  • Advanced timeout options (5 seconds, 30 seconds)
  • Log level controls
  • System paths and diagnostics
  • Additional configuration options

πŸ—οΈ Project Structure

SONU/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ tauri-v2/       # πŸ–₯️ Desktop app (Tauri + Rust) - v2.1.0
β”‚   β”‚   β”œβ”€β”€ src/        # React frontend
β”‚   β”‚   β”œβ”€β”€ src-tauri/  # Rust backend
β”‚   β”‚   └── e2e/        # E2E tests
β”‚   β”œβ”€β”€ mobile/         # πŸ“± Android app (Voice AI) - v1.2.1
β”‚   β”‚   └── src/        # Rust core
β”‚   └── desktop/        # πŸ—„οΈ Legacy Electron app (refactored)
β”‚       └── src/
β”‚           β”œβ”€β”€ main/   # Entry points
β”‚           β”œβ”€β”€ services/  # Business logic
β”‚           └── utils/  # Utilities
β”œβ”€β”€ shared/             # πŸ”„ Shared configurations
β”‚   └── config/         # Model configs, defaults
β”œβ”€β”€ .github/            # πŸ€– CI/CD workflows
β”œβ”€β”€ docker/             # 🐳 Docker configurations
β”œβ”€β”€ docs/               # πŸ“š Documentation
β”œβ”€β”€ scripts/            # πŸ› οΈ Helper scripts
└── README.md           # This file

πŸ“Š Version History

Desktop (Tauri)

Version Date Highlights
2.0.0 2026-01-11 Complete rewrite to Tauri + Rust

Mobile (Voice AI)

Version Date Highlights
1.2.1 2025-12-XX Latest Android release

Legacy Desktop (Electron)

Version Date Highlights
1.0.0 2025-XX-XX Original Electron + Python

πŸ› οΈ Development

Prerequisites

  • Rust 1.70+ (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  • Node.js 18+ (for Tauri frontend)
  • Android NDK (for mobile builds)

Versioning

We follow Semantic Versioning:

  • MAJOR (X.0.0) - Breaking changes, architecture rewrites
  • MINOR (0.X.0) - New features, backward compatible
  • PATCH (0.0.X) - Bug fixes, performance improvements

πŸ“ License

MIT License - See LICENSE for details.


πŸ™ Acknowledgments


Made with ❀️ by the SONU team

About

Professional offline voice typing application powered by Faster-Whisper AI

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •