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>
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.
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.