feat: implement isolated model worker with auto-restart and hot-reload
Tests / Go and GTK tests (push) Successful in 1m38s
Release / Tests before release (push) Successful in 1m34s
Release / Build and publish release (push) Successful in 2m24s

Introduce a supervised child process for capture, VAD, and recognition,
enabling automatic restart on crash/hang and hot-reload via SIGHUP.
Add `--model-auto-restart`, `--model-timeout`, and
`--model-shutdown-timeout` options. Refactor `Run()` with lifecycle
hooks for proper process group cleanup. Update README with new
behavior and CLI flags.
This commit is contained in:
2026-07-17 01:47:37 +03:00
parent b3ed538820
commit b0487be39e
11 changed files with 681 additions and 15 deletions
+2
View File
@@ -10,6 +10,7 @@ import (
"os/exec"
"strings"
"sync"
"syscall"
"tea.chunkbyte.com/kato/captioneer/src/audio"
)
@@ -41,6 +42,7 @@ func Packets(ctx context.Context, monitorSource string) (<-chan []float32, func(
"--latency-msec=50",
)
cmd.Stderr = os.Stderr
cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: syscall.SIGKILL}
stdout, err := cmd.StdoutPipe()
if err != nil {
return nil, nil, err