Cw
2026-07-04 fecea2c7a4ecc48b2354868894e78be361a2ccf1
C1.source/privatevoice.src/internal/engine/engine.go
@@ -21,6 +21,12 @@
   Close()
}
// ProviderEngine is implemented by engines that can report the concrete
// sherpa/onnxruntime provider selected at initialization time.
type ProviderEngine interface {
   Provider() string
}
// StreamingEngine is implemented by engines that can expose partial results
// while audio is still being captured.
type StreamingEngine interface {
@@ -116,6 +122,14 @@
   return newPlatformEngine(resolved)
}
func audioDurationMS(samples []float32) int64 {
   return int64(len(samples)) * 1000 / 16000
}
func durationMS(duration time.Duration) int64 {
   return duration.Milliseconds()
}
func isSupportedBackend(backend string) bool {
   switch backend {
   case model.BackendSenseVoice, model.BackendMoonshine, model.BackendTransducer, model.BackendNemoTransducer, model.BackendQwen3ASR, model.BackendXASRStreaming: