Ein vollständiges, modulares Sprachassistenten-System bestehend aus lokalem Hardware-Backend (arm kompatible) und Cross-Platform Client-Apps (Desktop/Mobile) mit moderner Web-GUI, KI-Integration und Automatisierung.
Das Ökosystem besteht aus zwei Hauptkomponenten, die nahtlos zusammenarbeiten:
Raspberry Pi/Odroid-basiertes Backend mit lokaler STT/TTS und KI-Integration
Electron Desktop-App und Cordova Mobile-App für universellen Zugriff
Klicken zum Einblenden des Architekturdiagramms
flowchart TB
subgraph Clients
Desktop[Desktop App]
Mobile[Mobile App]
WebGUI[Web GUI]
end
subgraph LocalBackend
subgraph Interface
Mic400[Mikrofon]
GUI400[Lokale GUI]
end
subgraph AudioNode
STT[STT Engine]
TTS[TTS Engine]
IntentRouting[Intent Routing]
Skills[Lokale Skills]
end
subgraph Gateway
Flowise[Flowise]
n8n[n8n]
end
end
subgraph CloudServer
ServerFlowise[Flowise Full]
ServerN8n[n8n Backend]
ServerLLM[Lokale LLMs]
end
%% Connections
Desktop -.->|WebSocket/HTTP| AudioNode
Mobile -.->|WebSocket/HTTP| AudioNode
WebGUI --> AudioNode
Mic400 --> AudioNode
GUI400 <--> AudioNode
AudioNode -->|Complex Queries| Gateway
Gateway -->|Heavy Tasks| CloudServer
IntentRouting -->|Simple Tasks| Skills
IntentRouting -->|Complex Tasks| Flowise
%% Network
subgraph Network
VPN[Headscale VPN]
end
Clients -.-> VPN
LocalBackend -.-> VPN
CloudServer -.-> VPN
- 🎤 Lokale Spracheingabe mit faster-whisper STT
- 🧩 Vereinheitlichter WebSocket-Server spricht JSON v1 und Binary v2
- 🔊 Flexible TTS-Engines mit Piper, Kokoro & Zonos + Realtime-Switching
- 🧠 Intelligentes Routing zwischen lokalen Skills und Cloud-LLMs
- 🌊 Moderne animierte UI mit konfigurierbaren Effekten
- 🔄 Automatisierung mit n8n Workflows
- 🔐 Sichere Vernetzung über Headscale VPN
- Lokale STT/TTS ohne Cloud-Abhängigkeit
- Modulare Architektur auf mehreren Raspberry Pi/Odroid
- FlowiseAI Integration für LLM-Agent-Routing
- n8n Workflows für Workflow-Automation
- Intent-basiertes Routing (lokal vs. remote)
- Wakeword-Erkennung mit RaspOVOS
- Native Menüs und Keyboard-Shortcuts
- System Tray Integration für Background-Betrieb
- Multi-Platform (Windows, macOS, Linux)
- Auto-Updates mit electron-updater
- Drag & Drop Support
- Touch-optimierte UI mit Haptic Feedback
- Background-Mode für kontinuierliche Nutzung
- Native Permissions Management
- Push-Benachrichtigungen
- PWA-Features mit Service Worker
Das System unterstützt jetzt flexibles Text-to-Speech mit Echtzeitwechsel zwischen verschiedenen TTS-Engines:
- Hochqualitative deutsche Stimmen mit natürlicher Aussprache
- Optimiert für deutsche Sprache und Sonderzeichen (ä, ö, ü, ß)
- Verschiedene Stimm-Modelle: thorsten, kerstin, eva_k, ramona, karlsson
- Offline-Verarbeitung ohne Cloud-Abhängigkeit
- ARM-optimiert für Raspberry Pi
- Final guard entfernt kombinierende Zeichen (U+0300–U+036F) vor der Synthese
- Debug:
PIPELINE_DEBUG_SANITIZE=1protokolliert entfernte Zeichen
- Kompakte Engine (~80MB quantisiert) mit schneller Inferenz
- Internationale Stimmen für Englisch und andere Sprachen
- Natürliche Sprachsynthese mit emotionaler Nuancierung
- Stimmen-Auswahl: af_sarah, af_heart, af_sky, af_nova, af_alloy, etc.
- Schnelle Verarbeitung ideal für responsives UX
- Nahtloser Engine-Wechsel während der Laufzeit
- GUI-Integration mit TTS Control Panel
- Per-Request Engine-Auswahl in WebSocket API
- Performance-Monitoring mit Latenz-Tracking
- Automatische Fallback-Mechanismen bei Engine-Fehlern
// Beispiel: Engine wechseln per WebSocket
{
"type": "switch_tts_engine",
"engine": "kokoro" // oder "piper"/"zonos"
}
// Beispiel: Spezifische Engine für Text
{
"type": "text",
"content": "Hello world",
"tts_engine": "kokoro",
"tts_voice": "af_sarah"
}📈 Performance-Vergleich:
- Piper: Höhere Qualität deutsche Texte (~100-200ms)
- Kokoro: Schnellere Verarbeitung mehrsprachig (~50-150ms)
- Auto-Switching: Optimale Engine basierend auf Textsprache
🛠 Installation: ./scripts/install-kokoro.sh für automatisches Setup
- 🎤 STT: Faster-Whisper – lokale Speech-to-Text
- 🔊 TTS: Piper TTS, Kokoro TTS & Zonos – Flexible Text-to-Speech Engines
- 🗣 Voice OS: RaspOVOS – Wakeword-Erkennung
- 🧠 LLM-Routing: FlowiseAI – No-Code Agent-Flows
- 🔁 Automation: n8n – Workflow-Automatisierung
- 🔐 Networking: Headscale – sicheres privates VPN
| Komponente | Desktop | Mobile | Web |
|---|---|---|---|
| Framework | Electron 28+ | Cordova 12+ | Modern Web APIs |
| UI | HTML5/CSS3/JS | HTML5/CSS3/JS | Responsive Design |
| Audio | Web Audio API | Cordova Media | MediaRecorder API |
| Notifications | Native | Cordova Plugins | Web Notifications |
| Storage | Electron Store | LocalStorage | IndexedDB |
Sprachassistent/
├── 🏠 Hardware-Backend (Raspberry Pi System)
│ ├── config/ # Gerät-spezifische Konfigurationen
│ │ ├── raspi4/ # STT/TTS Node Konfiguration
│ │ ├── raspi400/ # GUI Interface Konfiguration
│ │ └── odroid/ # Gateway Konfiguration
│ ├── scripts/ # Setup & Wartungs-Skripte
│ │ ├── setup-headscale.sh
│ │ ├── install-piper.sh
│ │ ├── start-stt.sh
│ │ └── start-tts.sh
│ ├── gui/ # Lokale Web-GUI
│ │ ├── index.html
│ │ ├── app.js
│ │ └── styles.css
│ └── docs/ # Hardware-System Dokumentation
│
├── 📱 Client-Apps (Cross-Platform)
│ └── voice-assistant-apps/
│ ├── desktop/ # Electron Desktop App
│ │ ├── src/ # Haupt-App Code
│ │ ├── package.json
│ │ └── build/ # Build-Output
│ ├── mobile/ # Cordova Mobile App
│ │ ├── .env # Mobile Konfiguration
│ │ ├── www/ # Web-Assets
│ │ ├── config.xml # Cordova Konfiguration
│ │ ├── hooks/ # Build-Hooks
│ │ └── platforms/ # Android/iOS
│ ├── shared/ # Gemeinsame Komponenten
│ │ ├── app.js # Core-Logik
│ │ └── index.html # Basis-Template
│ └── build_all.sh # Cross-Platform Build-Script
│
└── 📚 Dokumentation & Setup
├── README.md # Diese Datei
├── CONTRIBUTING.md # Beitragen-Guidelines
├── LICENSE # MIT Lizenz
├── env.example # Umgebungsvariablen-Template
└── .env.mobile.example # Mobile Client Environment Template
# Für Hardware-Backend
- Raspberry Pi 4 (STT/TTS Node)
- Raspberry Pi 400 (GUI Interface)
- Odroid N2 oder ähnlich (Gateway)
- Optional: Server für schwere LLM-Tasks
# Für Client-Apps
- Node.js 18+ & NPM 8+
- Android Studio (für Mobile)
- Git# STT Engine installieren
git clone https://github.com/guillaumekln/faster-whisper
cd faster-whisper && pip install .
# TTS Engine installieren
sudo apt install piper
# Projekt klonen und konfigurieren
git clone https://github.com/161sam/Sprachassistent.git
cd Sprachassistent
cp env.example .env
# .env bearbeiten mit deinen Einstellungen
# STT/TTS Services starten
./scripts/start-stt.sh
./scripts/start-tts.shcd Sprachassistent/gui
python -m http.server 8080
# GUI unter http://localhost:8080 verfügbar# Flowise installieren
git clone https://github.com/FlowiseAI/Flowise
cd Flowise && npm install && npm run build
# n8n installieren
docker run -it --rm -p 5678:5678 n8nio/n8n
# Services starten
npm start # Flowise
# n8n läuft bereits im Docker Container# Auf jedem Gerät ausführen
./scripts/setup-headscale.sh
sudo headscale up --hostname raspi4-stt # entsprechend anpassen
sudo headscale up --hostname raspi400-gui
sudo headscale up --hostname odroid-gatewaycd voice-assistant-apps
# Desktop App
cd desktop
npm install
npm run dev # Development
# Mobile App
cd ../mobile
npm install
npm install -g cordova
cordova platform add android
cordova run android
# Alle Apps bauen
../build_all.sh all releaseDas System routet Anfragen intelligent zwischen lokalen Skills und Remote-Services:
// config/raspi4/routing-config.json
{
"intents": {
"weather": {
"target": "n8n-workflow",
"endpoint": "odroid-n2.headscale:5678/webhook/weather"
},
"ai_question": {
"target": "flowise-agent",
"endpoint": "odroid-n2.headscale:3000/api/v1/prediction/agent-id"
},
"smart_home": {
"target": "local-skill",
"handler": "home_automation"
},
"calculation": {
"target": "local-skill",
"handler": "math_calculator"
}
}
}// voice-assistant-apps/shared/app.js
const config = {
// Hauptverbindung zum Raspberry Pi STT/TTS Node
websocket: {
url: 'ws://raspi4-stt.headscale:8123',
fallback: 'ws://192.168.1.100:8123'
},
// Direkte Verbindung zu Flowise/n8n (optional)
flowise: {
url: 'http://odroid-gateway.headscale:3000'
},
n8n: {
url: 'http://odroid-gateway.headscale:5678'
}
};- LM Studio starten und ein Modell laden
- In
.envLLM_API_BASEsetzen, z. B.http://localhost:1234/v1 - Der Backend-Server ruft beim Start
GET /modelsab und wählt das erste Modell - Die Web-GUI zeigt alle Modelle in einem Auswahlfeld
| Intent-Beispiel | Ziel | Handler |
|---|---|---|
| "Wie ist das Wetter?" | n8n Workflow | Wetter-API Call |
| "Was ist Künstliche Intelligenz?" | Flowise Agent | LLM (GPT/Claude/Llama) |
| "Mach das Licht an" | Local Skill | Home Assistant Integration |
| "Rechne 25 mal 17" | Local Skill | Math Calculator |
| "Spiele Musik ab" | Local Skill | MPD/Spotify Control |
| "Schreibe eine E-Mail" | Flowise Agent | LLM + SMTP Workflow |
# Direkt mit Raspberry Pi GUI interagieren
# Web-Interface: http://raspi400-gui.headscale:8080
# Voice Command via Mikrofon
"Hey Assistant, wie ist das Wetter heute?"
# -> n8n Workflow -> OpenWeatherMap API -> TTS Response
# Text Input via GUI
"Erkläre mir Machine Learning"
# -> Flowise Agent -> Local LLM -> Text Response# Desktop App starten
cd voice-assistant-apps/desktop
npm run dev
# Features:
# - Native Desktop Integration
# - System Tray für Background-Betrieb
# - Keyboard Shortcuts (Ctrl+Enter für Voice)
# - Auto-Updates
# - Multi-Monitor Support# Mobile App installieren
cd voice-assistant-apps/mobile
cp ../../.env.mobile.example .env
# .env anpassen mit Backend-URL und Token
cordova run android --device
# Features:
# - Touch-optimierte UI
# - Haptic Feedback
# - Background-Mode
# - Push Notifications
# - Offline-Fähigkeiten# STT Service testen
curl -X POST http://raspi4-stt.headscale:8123/stt \
-H "Content-Type: application/json" \
-d '{"audio": "base64_audio_data"}'
# TTS Service testen
curl -X POST http://raspi4-stt.headscale:8123/tts \
-H "Content-Type: application/json" \
-d '{"text": "Hallo Welt", "voice": "de-thorsten"}'
# Intent Routing testen
curl -X POST http://raspi4-stt.headscale:8123/query \
-H "Content-Type: application/json" \
-d '{"text": "Wie ist das Wetter?", "session": "test"}'# Desktop App Tests
cd voice-assistant-apps/desktop
npm test
npm run e2e
# Mobile App Tests
cd voice-assistant-apps/mobile
cordova run android --debug
# Chrome DevTools: chrome://inspect -> Remote Targets# Raspberry Pi Image erstellen
# 1. SD-Karte mit Raspberry Pi OS flashen
# 2. Setup-Skripte ausführen
./scripts/setup-complete-system.sh
# Docker Deployment (optional)
docker-compose -f docker-compose.hardware.yml up -dcd voice-assistant-apps
./build_all.sh desktop release
# Outputs:
# - KI-Sprachassistent-2.1.0.exe (Windows)
# - KI-Sprachassistent-2.1.0.dmg (macOS)
# - KI-Sprachassistent-2.1.0.AppImage (Linux)./build_all.sh mobile release
# Outputs:
# - app-release.apk (Android)
# - Signed für Google Play Store# skills/weather_skill.py
class WeatherSkill:
def handle_intent(self, intent_data):
location = intent_data.get('location', 'hier')
weather = self.get_weather(location)
return f"Das Wetter in {location} ist {weather}"
def get_weather(self, location):
# API Call zu OpenWeatherMap
pass// flowise-flows/assistant-agent.json
{
"nodes": [
{
"id": "llm-node",
"type": "ChatOpenAI",
"data": {
"model": "gpt-4",
"temperature": 0.7
}
},
{
"id": "memory-node",
"type": "ConversationSummaryMemory"
}
]
}// n8n-workflows/smart-home-control.json
{
"name": "Smart Home Control",
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"path": "smart-home"
}
},
{
"name": "Home Assistant",
"type": "n8n-nodes-base.homeAssistant"
}
]
}Wir freuen uns über Beiträge zu beiden Teilen des Systems! Bitte lesen Sie unsere Contributing Guidelines.
- 🏠 Hardware-Backend: Python Skills, STT/TTS Optimierung, Routing-Logik
- 📱 Client-Apps: UI/UX Verbesserungen, neue Features, Cross-Platform Support
- 🧠 KI-Integration: Flowise Flows, n8n Workflows, LLM Optimierung
- 📚 Dokumentation: Tutorials, Setup-Guides, Architecture Docs
- Fork das Repository
- Branch erstellen (
git checkout -b feature/amazing-feature) - Commit Änderungen (
git commit -m 'Add amazing feature') - Test auf verschiedenen Komponenten
- Pull Request öffnen
# STT Service funktioniert nicht
sudo systemctl status faster-whisper
journalctl -u faster-whisper -f
# TTS Audio-Ausgabe fehlt
alsamixer # Audio-Level prüfen
aplay /usr/share/sounds/alsa/Front_Left.wav
# Headscale Verbindung
headscale ping raspi4-stt
headscale status# Desktop Build-Fehler
cd voice-assistant-apps/desktop
rm -rf node_modules package-lock.json
npm install
# Mobile Build-Fehler
cd voice-assistant-apps/mobile
cordova clean android
cordova platform rm android && cordova platform add android# WebSocket-Verbindung testen
wscat -c ws://raspi4-stt.headscale:8123
# Firewall prüfen
sudo ufw status
sudo iptables -L
# DNS Resolution
nslookup raspi4-stt.headscale
ping raspi4-stt.headscaleSiehe TTS Sanitizer & Phoneme Troubleshooting für Hinweise zu fehlenden Phonemen und Unicode-Bereinigung.
- iOS Mobile App Support
- Wake Word Training Interface
- Advanced Intent Classification (ML-based)
- Multi-Language STT/TTS Support
- Home Assistant Deep Integration
- Edge AI Acceleration (Coral TPU Support)
- Custom Voice Cloning with Piper
- Advanced n8n Workflow Templates
- Distributed Load Balancing
- Advanced Analytics Dashboard
- Complete Architecture Redesign
- Kubernetes Orchestration Support
- Advanced Multi-Agent Systems
- Real-time Voice Conversation Mode
- Integrated Video Understanding
- Zentrale Steuerung aller Smart Home Geräte
- Sprachbasierte Automatisierung
- Lokale Verarbeitung ohne Cloud
- Meeting-Notizen per Spracheingabe
- E-Mail-Diktat und -Versand
- Kalender- und Task-Management
- Unterwegs-Zugriff auf Home-System
- Location-based Automations
- Offline-Funktionalität
- CRM-Integration über n8n
- Workflow-Automatisierung
- Team-Produktivitäts-Tools
Dieses Projekt ist unter der MIT License lizenziert.
- Faster-Whisper Team für lokale STT-Engine
- Piper TTS Entwickler für ARM-optimierte TTS
- RaspOVOS Community für Wakeword-Integration
- FlowiseAI für No-Code LLM-Workflows
- n8n für offene Automatisierungsplattform
- Headscale für sichere Vernetzung
- Electron Team für Desktop-Framework
- Apache Cordova für Mobile-Platform
- Web Audio API Implementierer
- Open Source Community
🌟 Entwickelt mit ❤️ für die Voice Assistant & Maker Community
⭐ Star uns auf GitHub, wenn dieses Projekt hilfreich ist!
- 📚 Hardware Setup Guide
- 🏗️ Architecture Deep Dive
- 🔧 Development Guide
- 🤝 Contributing Guidelines
- 🐛 Issues & Support
- 💬 Discussions
-
DEV-Start:
# Backend im Repo-Root: . .venv/bin/activate python -m ws_server.cli # Electron (in voice-assistant-apps/desktop): npm start
Alternativ: Nur
npm startim Desktop-Ordner – der Mainprozess startet das Backend automatisch. -
Build/Packaging: siehe docs/Build-Anleitung.md. Wir nutzen electron-builder. In Produktion startet die App ein mit PyInstaller erstelltes Backend-Binary aus
process.resourcesPath. -
Ports/ENV: Standard ist lokal
127.0.0.1:48231(WebSocket) und48232(Metrics). Binary v2 ist integriert; die altenws-server-enhanced*Dateien sind veraltet.
Bitte alle Modell-/Lib-Lizenzen vor Release prüfen.