Ariver
2026-06-30 ac31349b32d89b2798cd20224fcdede91d6bfe05
privatevoice.src/internal/engine/engine.go
@@ -2,6 +2,7 @@
import (
   "fmt"
   "time"
   "voicesnap/internal/config"
   "voicesnap/internal/language"
   "voicesnap/internal/logger"
@@ -24,6 +25,19 @@
// while audio is still being captured.
type StreamingEngine interface {
   NewStreamingSession() (StreamingSession, error)
}
// ReleaseTailCaptureEngine is implemented by engines that need a short audio
// capture grace period after the user releases the recording hotkey.
type ReleaseTailCaptureEngine interface {
   ReleaseTailCaptureDelay() time.Duration
}
// HoldPreCaptureEngine is implemented by engines that should start capturing
// audio immediately on hold-to-talk key down, before the activation delay has
// confirmed that the hotkey was not part of a key combination.
type HoldPreCaptureEngine interface {
   HoldPreCaptureEnabled() bool
}
// StreamingSession receives incremental 16kHz mono PCM and returns the current
@@ -104,7 +118,7 @@
func isSupportedBackend(backend string) bool {
   switch backend {
   case model.BackendSenseVoice, model.BackendMoonshine, model.BackendNemoTransducer, model.BackendQwen3ASR, model.BackendXASRStreaming:
   case model.BackendSenseVoice, model.BackendMoonshine, model.BackendTransducer, model.BackendNemoTransducer, model.BackendQwen3ASR, model.BackendXASRStreaming:
      return true
   default:
      return false