Ariver
2026-06-13 859c14d783dc31fe68550b114fc8adeea09dab2a
privatevoice.src/internal/engine/engine.go
@@ -20,6 +20,20 @@
   Close()
}
// StreamingEngine is implemented by engines that can expose partial results
// while audio is still being captured.
type StreamingEngine interface {
   NewStreamingSession() (StreamingSession, error)
}
// StreamingSession receives incremental 16kHz mono PCM and returns the current
// best transcript for the active utterance.
type StreamingSession interface {
   Accept(samples []float32) (string, error)
   Finish() (string, error)
   Close()
}
// ModelDir returns the path to the sensevoice model directory.
func ModelDir() string {
   resolved, err := resolveCurrentModel()
@@ -90,7 +104,7 @@
func isSupportedBackend(backend string) bool {
   switch backend {
   case model.BackendSenseVoice, model.BackendMoonshine, model.BackendNemoTransducer, model.BackendQwen3ASR:
   case model.BackendSenseVoice, model.BackendMoonshine, model.BackendNemoTransducer, model.BackendQwen3ASR, model.BackendXASRStreaming:
      return true
   default:
      return false