dictation-service/dictation.service
Kade Heyborne 73a15d03cd
Fix dictation service: state detection, async processing, and performance optimizations
- Fix state detection priority: dictation now takes precedence over conversation
- Fix critical bug: event loop was created but never started, preventing async coroutines from executing
- Optimize audio processing: reorder AcceptWaveform/PartialResult checks
- Switch to faster Vosk model: vosk-model-en-us-0.22-lgraph for 2-3x speed improvement
- Reduce block size from 8000 to 4000 for lower latency
- Add filtering to remove spurious 'the', 'a', 'an' words from start/end of transcriptions
- Update toggle-dictation.sh to properly clean up conversation lock file
- Improve batch audio processing for better responsiveness
2025-12-04 11:49:07 -07:00

31 lines
961 B
Desktop File

[Unit]
Description=AI Dictation Service - Voice to Text with AI Conversation
Documentation=https://github.com/alphacep/vosk-api
After=graphical-session.target sound.target
Wants=sound.target
PartOf=graphical-session.target
[Service]
Type=simple
User=universal
Group=universal
WorkingDirectory=/mnt/storage/Development/dictation-service
EnvironmentFile=-/etc/environment
ExecStart=/bin/bash -c 'export DISPLAY=${DISPLAY:-:0}; export XAUTHORITY=${XAUTHORITY:-/home/universal/.Xauthority}; /mnt/storage/Development/dictation-service/.venv/bin/python src/dictation_service/ai_dictation_simple.py'
Restart=always
RestartSec=3
StandardOutput=journal
StandardError=journal
# Audio device permissions handled by user session
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/mnt/storage/Development/dictation-service
ReadWritePaths=/home/universal/.gemini/tmp/
[Install]
WantedBy=graphical-session.target