-
Notifications
You must be signed in to change notification settings - Fork 30
New services added and windows compatibility #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Configure DaisyUI to use dark theme by default - Fix dropdown (select) text visibility with white text on dark background - Fix input field text visibility for all input types - Fix placeholder text color (gray) - Fix fieldset legend text visibility - Fix tab navigation text (light gray for unselected, white for selected) - Add build automation scripts: * build-frontend.bat - Quick frontend-only builds * build-full.bat - Complete build with Go backend * build-dev.bat - Development mode with auto-reload All text elements in settings dialogs now have proper contrast and visibility. Co-authored-by: Alejandro <aleja@alicexg.local> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace gRPC fallback-to-CLI mode with native whisper-server.exe HTTP server for persistent model loading and 2-3x faster transcription performance. ## Key Changes ### Backend (Go) - Add HTTP client for whisper-server.exe communication - Create audio_utils.go with WAV conversion helpers - Add gRPC service implementation (legacy fallback) - Update STT service with HTTP > gRPC > CLI priority chain - Update model manager to initialize HTTP mode via env vars - Add protocol buffer definitions for gRPC service ### Electron Process Management - Add WhisperHttpServerManager for whisper-server.exe lifecycle - Add WhisperServiceManager for gRPC service (legacy) - Add LoggingManager for file-based Electron logging - Update BackendManager with intelligent stderr filtering - Update main process to start whisper-server before Go backend - Configure HTTP mode via environment variables ### Performance Improvements - Model loads once at startup (not per-request) - Transcription: ~300-400ms (was ~700ms with CLI mode) - Eliminates ~200ms model loading overhead per request - Supports chunked audio for future realtime processing ### Logging & Debugging - All Electron logs written to %APPDATA%/alice-ai-app/logs/ - Backend logs written to resources/backend/logs/ - Whisper server logs written to resources/backend/bin/logs/ - Intelligent filtering: only actual errors shown in console - HTTP request logs kept in backend files only ### Build System - Add protocol buffer compilation step to build-full.bat - Update build-go.js for new dependencies - Update package.json with required dependencies ### Documentation - Add memory system architecture documentation - Add backend service analysis documentation - Add voice authentication feature specs - Add custom tooling system documentation ## Architecture **New Flow:** Frontend Audio → Go Backend → whisper-server.exe (HTTP) → Pre-loaded model → Fast response **Fallback Chain:** HTTP mode → gRPC mode → CLI mode (automatic degradation) ## Configuration Set via environment variables (auto-configured by Electron): - WHISPER_USE_HTTP=true (enables HTTP mode) - WHISPER_HTTP_ADDR=http://localhost:8082 - Whisper server runs on port 8082 - Main backend runs on port 8765 ## Testing Verified: - ✅ Whisper HTTP server starts successfully - ✅ Model loads from correct absolute path - ✅ HTTP mode is used for transcription - ✅ Performance improvement confirmed (~400ms vs ~700ms) - ✅ Graceful shutdown of all services - ✅ Clean log output without HTTP noise Co-authored-by: Alejandro <aleja@alicexg.local>
Fixes the "spawn UNKNOWN" error when starting Go backend services on Windows. Changes: - Add bin/ directory to PATH in backendManager.ts and piperServiceManager.ts to ensure Windows can find onnxruntime.dll and onnxruntime_providers_shared.dll - Implement Piper gRPC service for faster TTS processing - Add piper-service build step to build-go.js - Add piperServiceManager to manage Piper gRPC service lifecycle - Integrate Piper gRPC client in backend models manager The PATH fix resolves DLL loading issues that prevented the Go backend from starting on Windows systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vnetmx thank you for your contribution. This PR has several valuable parts but also introduces patterns that don't fit Alice's architecture as an Electron desktop app.
Concerns
- Dark Theme & UI Fixes section.
What problem are these fixes trying to solve? Have you encountered issues with dark mode or UI colors chema? If so, it would be very helpful to see examples of those issues.
"Added build automation scripts (build-frontend.bat, build-full.bat, build-dev.bat)" - why this was added.
// package.json already has:
"build": "npm run build:go && vite build && npx electron-builder"The npm run build command already handles Go compilation, frontend build, and Electron bundling. What do the new .bat scripts provide that isn't already covered? These scripts treat components as separate (web frontend, backend services) when Electron bundles everything into one desktop app. There is some code and build logic related, but that's more like a candidate for clean-up.
-
Separating STT/TTS services into separate gRPC servers, exposing http API can be a good way to do things for a web app. But this adds overhead (HTTP/gRPC stacks) for same-machine communication. What problem does gRPC solve that can't be handled with the existing internal service coordination?
-
Documentation
I'm not entirely sure if there is a reason to support extensive developer documentation. This can be generated for a coding agent without the need for extra context (one document, such as CLAUDE.md, which is compact and contains everything needed). Hosting docs separately brings more maintenance issues than solving an actual problem.
What's Good
- Windows PATH Fix
// backendManager.ts - THIS IS CORRECT
const binDir = path.join(backendDir, 'bin')
const updatedPath = `${binDir}${pathSeparator}${process.env.PATH || ''}`Why: This fixes the ONNX Runtime DLL loading issue on Windows. This is a legitimate bug fix.
- Logging Infrastructure
// loggingManager.ts - THIS IS USEFUL
electron/main/loggingManager.ts
- AWS Bedrock Integration (Good, if needed)
src/services/llmProviders/bedrock.ts
Why: Adding a new LLM provider is a valid functionality.
Recommended Actions
Please Keep:
- Windows PATH fix (with explanation of the DLL issue it solves)
- Logging infrastructure (valuable for debugging)
- AWS Bedrock integration (if users want this provider)
Please Remove:
- All gRPC service code (
backend/cmd/*-service/,backend/internal/grpc/,backend/proto/) - Whisper HTTP server (
whisperHttpServerManager.ts) - Separate build scripts (
build-*.bat)
Please Clarify:
- Dark theme fixes (show examples or explain the problem)
Description
Add a few improvements to Alice AI, focusing on performance optimization, Windows compatibility:
Dark Theme & UI Fixes
Performance Optimization (2-3x faster STT)
Windows DLL Resolution Fix
Enhanced Infrastructure
What is the purpose of this pull request?