fix(audio): address CoreML VAD review feedback

This commit is contained in:
Edison Jwa
2026-06-02 19:39:11 +09:00
parent 966afd2b53
commit ddf858cc6c
7 changed files with 40 additions and 21 deletions
+3 -6
View File
@@ -100,12 +100,6 @@ pub enum VadBackend {
Disabled,
}
#[cfg(target_os = "ios")]
fn default_vad_backend() -> VadBackend {
VadBackend::SileroOnnx
}
#[cfg(not(target_os = "ios"))]
fn default_vad_backend() -> VadBackend {
VadBackend::SileroOnnx
}
@@ -114,6 +108,9 @@ impl VadBackend {
/// Stable bridge/debug string.
pub fn as_str(self) -> &'static str {
match self {
#[cfg(any(target_os = "ios", target_os = "macos"))]
Self::SileroOnnx => "apple_coreml",
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
Self::SileroOnnx => "silero_vad_onnx",
Self::WebrtcVad => "webrtc_vad",
Self::EnergyDebug => "energy_debug",