Commit Graph
4 Commits
Author SHA1 Message Date
burakgizliceandClaude Opus 4.6 13217f52f8 fix: detect stale PID files from recycled PIDs
The daemon startup check only used kill -0 to verify if the PID from
the PID file was alive. If the OS recycled that PID for an unrelated
process, hyprvoice would refuse to start with "daemon already running"
even though no hyprvoice instance was running.

Now also reads /proc/<pid>/cmdline to verify the process is actually
hyprvoice before treating it as a running daemon. If it's a different
process, the PID file is treated as stale and removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 09:50:55 +03:00
burakgizlice 295bd0f9f9 fix: remove frame-stealing read from pipeline loop
The pipeline's main select loop was reading from frameCh alongside the
SimpleTranscriber's collectAudio goroutine. Since Go channels deliver
each value to exactly one reader, the pipeline was randomly consuming
~50% of audio frames and discarding them, causing the transcriber to
receive fragmented audio and produce incomplete transcriptions.

Remove the `case <-frameCh:` from the pipeline loop so all frames are
exclusively consumed by the transcriber.
2026-02-14 00:23:52 +03:00
burakgizlice b694e58d90 fix: add timeout to unixgram dial
Use net.Dialer with a 500ms timeout for the unixgram dial to guard
against edge cases, as suggested in review.
2026-02-14 00:16:30 +03:00
burakgizlice 4a5d60095a fix: use SOCK_DGRAM for ydotoold socket (v1.0.4+)
ydotoold v1.0.4+ uses SOCK_DGRAM (unixgram) Unix sockets instead of
SOCK_STREAM. The availability check was using net.DialTimeout("unix", ...)
which only supports stream sockets, causing a "protocol wrong type for
socket" error on systems with newer ydotool versions.

Try unixgram first, then fall back to stream for older versions.
2026-02-13 23:45:43 +03:00