Files
blurt/blurt-toggle
T
felixm 777d4bef33 Speed up transcription with a pluggable provider backend
Transcription:
- Provider-pluggable backend: each model routes to OpenAI (multipart
  upload) or OpenRouter (JSON + base64 body). Add OpenRouter's
  whisper-large-v3-turbo (Groq-served, ~216x real-time) to the tray
  menu for far lower latency than whisper-1.
- Load API keys env -> keyring -> file for both providers via a shared
  helper.
- Encode the WAV in memory and reuse a warm requests.Session (no temp file).

Other improvements:
- blurt-toggle signals the running app directly via SIGUSR1 instead of
  paying ~0.5s to import the full stack through "uv run blurt toggle".
- Remove the redundant dead blurt shell script.
- Suppress the benign Gdk-CRITICAL warning from pystray's GtkStatusIcon.
- gitignore openrouter_key.txt.

Transcription code is platform-agnostic; the Windows/Linux platform layer
is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 08:38:05 -04:00

17 lines
506 B
Bash
Executable File

#!/bin/sh
# Toggle Blurt recording by signaling the running tray app directly.
#
# A direct SIGUSR1 avoids the ~0.5s cost of "uv run blurt toggle", which
# imported the full numpy/scipy/sounddevice/pystray stack just to send one
# signal. The PID file is written by blurt.py's setup_toggle_trigger().
PID_FILE="${TMPDIR:-/tmp}/blurt.pid"
pid=$(cat "$PID_FILE" 2>/dev/null)
if [ -n "$pid" ] && kill -USR1 "$pid" 2>/dev/null; then
exit 0
fi
notify-send blurt "Blurt is not running" 2>/dev/null
exit 1