feat: implement isolated model worker with auto-restart and hot-reload
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:
@@ -25,6 +25,11 @@ type Resources struct {
|
||||
vad *sherpa.VoiceActivityDetector
|
||||
}
|
||||
|
||||
func Validate(settings config.Settings) error {
|
||||
_, err := validatePaths(settings.ModelsDir, settings.Mode)
|
||||
return err
|
||||
}
|
||||
|
||||
func New(settings config.Settings) (*Resources, error) {
|
||||
paths, err := validatePaths(settings.ModelsDir, settings.Mode)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user