feat(voice): add iOS VAD runtime support
This commit is contained in:
@@ -274,22 +274,7 @@ fn log_file_path() -> Option<std::path::PathBuf> {
|
||||
}
|
||||
#[cfg(target_os = "ios")]
|
||||
{
|
||||
// iOS sandbox: write the log to the app's Documents
|
||||
// directory so it persists across launches and can be
|
||||
// pulled via Xcode -> Devices and Simulators -> Download
|
||||
// Container, OR via Files.app on the device (the app
|
||||
// appears under "On My iPhone" once we declare
|
||||
// UIFileSharingEnabled + LSSupportsOpeningDocumentsInPlace
|
||||
// in Info.plist — done in a follow-up).
|
||||
//
|
||||
// HOME on iOS resolves to the app sandbox root; Documents
|
||||
// is the standard user-visible subdirectory.
|
||||
let home = std::env::var_os("HOME")?;
|
||||
Some(
|
||||
std::path::PathBuf::from(home)
|
||||
.join("Documents")
|
||||
.join("chanora.log"),
|
||||
)
|
||||
None
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
@@ -508,13 +493,46 @@ pub async fn is_connected() -> bool {
|
||||
|
||||
/// Handle iOS AVAudioSession route changes (SDD-100).
|
||||
#[frb(sync)]
|
||||
pub fn handle_route_change() {
|
||||
let result = runtime().block_on(async { session().ios_handle_route_change().await });
|
||||
pub fn handle_route_change(route: BridgeAudioRoute) {
|
||||
let result =
|
||||
runtime().block_on(async { session().ios_handle_route_change(route.into()).await });
|
||||
if let Err(e) = result {
|
||||
warn!(target: "chanora_bridge", error = %e, "iOS route-change handling failed");
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle iOS AVAudioSession media-services reset (legacy, no route arg).
|
||||
///
|
||||
/// Called by the existing FRB-generated Dart binding. Uses
|
||||
/// `AudioRoute::Unknown` which triggers a route-change recompute.
|
||||
/// The AppDelegate now also calls `handle_media_services_reset_with_route`
|
||||
/// directly after rebuilding the session.
|
||||
#[frb(sync)]
|
||||
pub fn handle_media_services_reset() {
|
||||
let result = runtime().block_on(async {
|
||||
session()
|
||||
.ios_handle_media_services_reset(chanora_audio::AudioRoute::Unknown)
|
||||
.await
|
||||
});
|
||||
if let Err(e) = result {
|
||||
warn!(target: "chanora_bridge", error = %e, "iOS media-services reset handling failed");
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle iOS AVAudioSession media-services reset with the current
|
||||
/// route class. Called by AppDelegate after rebuilding the session.
|
||||
///
|
||||
/// `route_class` is the Swift-side route class string (e.g. "Speaker").
|
||||
#[frb(sync)]
|
||||
pub fn handle_media_services_reset_with_route(route_class: String) {
|
||||
let route = chanora_audio::AudioRoute::from_route_class(&route_class);
|
||||
let result =
|
||||
runtime().block_on(async { session().ios_handle_media_services_reset(route).await });
|
||||
if let Err(e) = result {
|
||||
warn!(target: "chanora_bridge", error = %e, "iOS media-services reset (with route) handling failed");
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle iOS AVAudioSession interruption begin (SDD-101).
|
||||
#[frb(sync)]
|
||||
pub fn handle_interruption_began() {
|
||||
@@ -787,6 +805,331 @@ pub struct BridgeAudioStats {
|
||||
pub ptt_active: bool,
|
||||
}
|
||||
|
||||
/// Bridge route class for P1 audio-processing policy.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BridgeAudioRoute {
|
||||
/// Built-in speakerphone.
|
||||
Speaker,
|
||||
/// Built-in receiver/earpiece.
|
||||
Earpiece,
|
||||
/// Wired or USB headset.
|
||||
WiredHeadset,
|
||||
/// Bluetooth HFP duplex route.
|
||||
BluetoothHfp,
|
||||
/// Bluetooth A2DP output-only route.
|
||||
BluetoothA2dp,
|
||||
/// Unknown route.
|
||||
Unknown,
|
||||
}
|
||||
|
||||
/// Bridge iOS voice-processing mode.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BridgeIosVoiceProcessingMode {
|
||||
/// Shipping VPIO path.
|
||||
PlatformVoiceProcessing,
|
||||
/// Experimental Sonora path.
|
||||
SonoraExperimental,
|
||||
}
|
||||
|
||||
/// Bridge processing backend.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BridgeAudioBackend {
|
||||
/// Platform voice processing.
|
||||
PlatformVoiceProcessing,
|
||||
/// Sonora backend.
|
||||
Sonora,
|
||||
/// WebRTC APM backend.
|
||||
WebrtcApm,
|
||||
/// No-op backend.
|
||||
Noop,
|
||||
}
|
||||
|
||||
/// Bridge VAD backend.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BridgeVadBackend {
|
||||
/// Silero ONNX VAD.
|
||||
SileroOnnx,
|
||||
/// TEN VAD.
|
||||
TenVad,
|
||||
/// WebRTC fallback VAD.
|
||||
WebrtcVad,
|
||||
/// Debug energy VAD.
|
||||
EnergyDebug,
|
||||
/// VAD disabled.
|
||||
Disabled,
|
||||
}
|
||||
|
||||
/// Bridge effect owner for AEC/NS/AGC.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BridgeEffectOwner {
|
||||
/// Platform-owned effect.
|
||||
Platform,
|
||||
/// Sonora-owned effect.
|
||||
Sonora,
|
||||
/// WebRTC APM-owned effect.
|
||||
WebrtcApm,
|
||||
/// Conservative route-managed setting.
|
||||
Conservative,
|
||||
/// Disabled.
|
||||
Off,
|
||||
}
|
||||
|
||||
/// P1 audio-processing configuration DTO.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct BridgeAudioProcessingConfig {
|
||||
/// Route class.
|
||||
pub route: BridgeAudioRoute,
|
||||
/// iOS voice-processing mode.
|
||||
pub ios_mode: BridgeIosVoiceProcessingMode,
|
||||
/// Processing backend.
|
||||
pub processing_backend: BridgeAudioBackend,
|
||||
/// VAD backend.
|
||||
pub vad_backend: BridgeVadBackend,
|
||||
/// AEC owner.
|
||||
pub aec: BridgeEffectOwner,
|
||||
/// Noise suppression owner.
|
||||
pub ns: BridgeEffectOwner,
|
||||
/// AGC owner.
|
||||
pub agc: BridgeEffectOwner,
|
||||
/// High-pass filter enabled.
|
||||
pub hpf_enabled: bool,
|
||||
/// Limiter enabled.
|
||||
pub limiter_enabled: bool,
|
||||
/// VAD hangover in ms.
|
||||
pub vad_hangover_ms: u32,
|
||||
/// VAD pre-roll in ms.
|
||||
pub vad_pre_roll_ms: u32,
|
||||
/// Minimum transmit duration in ms.
|
||||
pub vad_min_tx_ms: u32,
|
||||
/// Debug WAV dump enabled.
|
||||
pub debug_wav_dump_enabled: bool,
|
||||
}
|
||||
|
||||
/// P1 audio-processing stats DTO.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct BridgeAudioProcessingStats {
|
||||
/// Input dBFS.
|
||||
pub input_dbfs: f32,
|
||||
/// Render dBFS.
|
||||
pub render_dbfs: f32,
|
||||
/// Processed capture dBFS.
|
||||
pub processed_dbfs: f32,
|
||||
/// Latest VAD probability.
|
||||
pub vad_probability: f32,
|
||||
/// VAD active.
|
||||
pub vad_active: bool,
|
||||
/// Currently transmitting.
|
||||
pub transmitting: bool,
|
||||
/// VAD backend.
|
||||
pub vad_backend: BridgeVadBackend,
|
||||
/// Fallback VAD active.
|
||||
pub vad_fallback_active: bool,
|
||||
/// Processing backend.
|
||||
pub processing_backend: BridgeAudioBackend,
|
||||
/// iOS voice-processing mode.
|
||||
pub ios_voice_processing_mode: BridgeIosVoiceProcessingMode,
|
||||
/// Audio route.
|
||||
pub audio_route: BridgeAudioRoute,
|
||||
/// Actual sample rate.
|
||||
pub actual_sample_rate_hz: u32,
|
||||
/// Actual IO buffer frames.
|
||||
pub actual_io_buffer_frames: u32,
|
||||
/// Input overruns.
|
||||
pub input_overruns: u64,
|
||||
/// Output underruns.
|
||||
pub output_underruns: u64,
|
||||
/// Callback xruns.
|
||||
pub callback_xruns: u64,
|
||||
/// Clipped samples.
|
||||
pub clipped_samples: u64,
|
||||
/// Sonora enabled.
|
||||
pub sonora_enabled: bool,
|
||||
/// Platform voice processing enabled.
|
||||
pub platform_voice_processing_enabled: bool,
|
||||
}
|
||||
|
||||
impl From<BridgeAudioRoute> for chanora_core::AudioRoute {
|
||||
fn from(route: BridgeAudioRoute) -> Self {
|
||||
match route {
|
||||
BridgeAudioRoute::Speaker => Self::Speaker,
|
||||
BridgeAudioRoute::Earpiece => Self::Earpiece,
|
||||
BridgeAudioRoute::WiredHeadset => Self::WiredHeadset,
|
||||
BridgeAudioRoute::BluetoothHfp => Self::BluetoothHfp,
|
||||
BridgeAudioRoute::BluetoothA2dp => Self::BluetoothA2dp,
|
||||
BridgeAudioRoute::Unknown => Self::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::AudioRoute> for BridgeAudioRoute {
|
||||
fn from(route: chanora_core::AudioRoute) -> Self {
|
||||
match route {
|
||||
chanora_core::AudioRoute::Speaker => Self::Speaker,
|
||||
chanora_core::AudioRoute::Earpiece => Self::Earpiece,
|
||||
chanora_core::AudioRoute::WiredHeadset => Self::WiredHeadset,
|
||||
chanora_core::AudioRoute::BluetoothHfp => Self::BluetoothHfp,
|
||||
chanora_core::AudioRoute::BluetoothA2dp => Self::BluetoothA2dp,
|
||||
chanora_core::AudioRoute::Unknown => Self::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BridgeIosVoiceProcessingMode> for chanora_core::IosVoiceProcessingMode {
|
||||
fn from(mode: BridgeIosVoiceProcessingMode) -> Self {
|
||||
match mode {
|
||||
BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => Self::PlatformVoiceProcessing,
|
||||
BridgeIosVoiceProcessingMode::SonoraExperimental => Self::SonoraExperimental,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::IosVoiceProcessingMode> for BridgeIosVoiceProcessingMode {
|
||||
fn from(mode: chanora_core::IosVoiceProcessingMode) -> Self {
|
||||
match mode {
|
||||
chanora_core::IosVoiceProcessingMode::PlatformVoiceProcessing => {
|
||||
Self::PlatformVoiceProcessing
|
||||
}
|
||||
chanora_core::IosVoiceProcessingMode::SonoraExperimental => Self::SonoraExperimental,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BridgeAudioBackend> for chanora_core::AudioBackend {
|
||||
fn from(backend: BridgeAudioBackend) -> Self {
|
||||
match backend {
|
||||
BridgeAudioBackend::PlatformVoiceProcessing => Self::PlatformVoiceProcessing,
|
||||
BridgeAudioBackend::Sonora => Self::Sonora,
|
||||
BridgeAudioBackend::WebrtcApm => Self::WebrtcApm,
|
||||
BridgeAudioBackend::Noop => Self::Noop,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::AudioBackend> for BridgeAudioBackend {
|
||||
fn from(backend: chanora_core::AudioBackend) -> Self {
|
||||
match backend {
|
||||
chanora_core::AudioBackend::PlatformVoiceProcessing => Self::PlatformVoiceProcessing,
|
||||
chanora_core::AudioBackend::Sonora => Self::Sonora,
|
||||
chanora_core::AudioBackend::WebrtcApm => Self::WebrtcApm,
|
||||
chanora_core::AudioBackend::Noop => Self::Noop,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BridgeVadBackend> for chanora_core::VadBackend {
|
||||
fn from(backend: BridgeVadBackend) -> Self {
|
||||
match backend {
|
||||
BridgeVadBackend::SileroOnnx => Self::SileroOnnx,
|
||||
BridgeVadBackend::TenVad => Self::TenVad,
|
||||
BridgeVadBackend::WebrtcVad => Self::WebrtcVad,
|
||||
BridgeVadBackend::EnergyDebug => Self::EnergyDebug,
|
||||
BridgeVadBackend::Disabled => Self::Disabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::VadBackend> for BridgeVadBackend {
|
||||
fn from(backend: chanora_core::VadBackend) -> Self {
|
||||
match backend {
|
||||
chanora_core::VadBackend::SileroOnnx => Self::SileroOnnx,
|
||||
chanora_core::VadBackend::TenVad => Self::TenVad,
|
||||
chanora_core::VadBackend::WebrtcVad => Self::WebrtcVad,
|
||||
chanora_core::VadBackend::EnergyDebug => Self::EnergyDebug,
|
||||
chanora_core::VadBackend::Disabled => Self::Disabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BridgeEffectOwner> for chanora_core::EffectOwner {
|
||||
fn from(owner: BridgeEffectOwner) -> Self {
|
||||
match owner {
|
||||
BridgeEffectOwner::Platform => Self::Platform,
|
||||
BridgeEffectOwner::Sonora => Self::Sonora,
|
||||
BridgeEffectOwner::WebrtcApm => Self::WebrtcApm,
|
||||
BridgeEffectOwner::Conservative => Self::Conservative,
|
||||
BridgeEffectOwner::Off => Self::Off,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::EffectOwner> for BridgeEffectOwner {
|
||||
fn from(owner: chanora_core::EffectOwner) -> Self {
|
||||
match owner {
|
||||
chanora_core::EffectOwner::Platform => Self::Platform,
|
||||
chanora_core::EffectOwner::Sonora => Self::Sonora,
|
||||
chanora_core::EffectOwner::WebrtcApm => Self::WebrtcApm,
|
||||
chanora_core::EffectOwner::Conservative => Self::Conservative,
|
||||
chanora_core::EffectOwner::Off => Self::Off,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BridgeAudioProcessingConfig> for chanora_core::AudioProcessingConfig {
|
||||
fn from(config: BridgeAudioProcessingConfig) -> Self {
|
||||
Self {
|
||||
route: config.route.into(),
|
||||
ios_mode: config.ios_mode.into(),
|
||||
processing_backend: config.processing_backend.into(),
|
||||
vad_backend: config.vad_backend.into(),
|
||||
aec: config.aec.into(),
|
||||
ns: config.ns.into(),
|
||||
agc: config.agc.into(),
|
||||
hpf_enabled: config.hpf_enabled,
|
||||
limiter_enabled: config.limiter_enabled,
|
||||
vad_hangover_ms: config.vad_hangover_ms,
|
||||
vad_pre_roll_ms: config.vad_pre_roll_ms,
|
||||
vad_min_tx_ms: config.vad_min_tx_ms,
|
||||
debug_wav_dump_enabled: config.debug_wav_dump_enabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::AudioProcessingConfig> for BridgeAudioProcessingConfig {
|
||||
fn from(c: chanora_core::AudioProcessingConfig) -> Self {
|
||||
Self {
|
||||
route: c.route.into(),
|
||||
ios_mode: c.ios_mode.into(),
|
||||
processing_backend: c.processing_backend.into(),
|
||||
vad_backend: c.vad_backend.into(),
|
||||
aec: c.aec.into(),
|
||||
ns: c.ns.into(),
|
||||
agc: c.agc.into(),
|
||||
hpf_enabled: c.hpf_enabled,
|
||||
limiter_enabled: c.limiter_enabled,
|
||||
vad_hangover_ms: c.vad_hangover_ms,
|
||||
vad_pre_roll_ms: c.vad_pre_roll_ms,
|
||||
vad_min_tx_ms: c.vad_min_tx_ms,
|
||||
debug_wav_dump_enabled: c.debug_wav_dump_enabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<chanora_core::AudioProcessingStats> for BridgeAudioProcessingStats {
|
||||
fn from(stats: chanora_core::AudioProcessingStats) -> Self {
|
||||
Self {
|
||||
input_dbfs: stats.input_dbfs,
|
||||
render_dbfs: stats.render_dbfs,
|
||||
processed_dbfs: stats.processed_dbfs,
|
||||
vad_probability: stats.vad_probability,
|
||||
vad_active: stats.vad_active,
|
||||
transmitting: stats.transmitting,
|
||||
vad_backend: stats.vad_backend.into(),
|
||||
vad_fallback_active: stats.vad_fallback_active,
|
||||
processing_backend: stats.processing_backend.into(),
|
||||
ios_voice_processing_mode: stats.ios_voice_processing_mode.into(),
|
||||
audio_route: stats.audio_route.into(),
|
||||
actual_sample_rate_hz: stats.actual_sample_rate_hz,
|
||||
actual_io_buffer_frames: stats.actual_io_buffer_frames,
|
||||
input_overruns: stats.input_overruns,
|
||||
output_underruns: stats.output_underruns,
|
||||
callback_xruns: stats.callback_xruns,
|
||||
clipped_samples: stats.clipped_samples,
|
||||
sonora_enabled: stats.sonora_enabled,
|
||||
platform_voice_processing_enabled: stats.platform_voice_processing_enabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- Diagnostics (A.3) ----------
|
||||
|
||||
/// User-initiated diagnostic export. Returns a multi-line text
|
||||
@@ -1335,3 +1678,95 @@ pub async fn audio_stats() -> Result<BridgeAudioStats, BridgeError> {
|
||||
ptt_active: p,
|
||||
})
|
||||
}
|
||||
|
||||
/// Apply the P1 audio-processing config.
|
||||
pub async fn set_audio_processing_config(
|
||||
config: BridgeAudioProcessingConfig,
|
||||
) -> Result<(), BridgeError> {
|
||||
runtime()
|
||||
.spawn(async move { session().set_audio_processing_config(config.into()).await })
|
||||
.await
|
||||
.map_err(|e| task_join_error("set_audio_processing_config", e))??;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Read the current audio-processing config.
|
||||
///
|
||||
/// Returns the live config as last applied to the audio engine.
|
||||
/// Returns a default config when no session is active.
|
||||
pub async fn get_audio_processing_config() -> Result<BridgeAudioProcessingConfig, BridgeError> {
|
||||
let config = runtime()
|
||||
.spawn(async { session().get_audio_processing_config().await })
|
||||
.await
|
||||
.map_err(|e| task_join_error("get_audio_processing_config", e))??;
|
||||
Ok(config.into())
|
||||
}
|
||||
|
||||
/// Read P1 audio-processing diagnostics.
|
||||
pub async fn audio_processing_stats() -> Result<BridgeAudioProcessingStats, BridgeError> {
|
||||
let stats = runtime()
|
||||
.spawn(async { session().audio_processing_stats().await })
|
||||
.await
|
||||
.map_err(|e| task_join_error("audio_processing_stats", e))??;
|
||||
Ok(stats.into())
|
||||
}
|
||||
|
||||
/// Configure the VAD model path.
|
||||
pub async fn set_vad_model_path(path: String) -> Result<(), BridgeError> {
|
||||
if path.trim().is_empty() {
|
||||
return Err(BridgeError::InvalidCommand(
|
||||
"vad model path must not be empty".to_string(),
|
||||
));
|
||||
}
|
||||
runtime()
|
||||
.spawn(async move { session().set_vad_model_path(path).await })
|
||||
.await
|
||||
.map_err(|e| task_join_error("set_vad_model_path", e))??;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Enable or disable audio debug WAV dumping.
|
||||
pub async fn enable_audio_debug_wav_dump(enabled: bool) -> Result<(), BridgeError> {
|
||||
runtime()
|
||||
.spawn(async move { session().set_audio_debug_wav_dump(enabled).await })
|
||||
.await
|
||||
.map_err(|e| task_join_error("enable_audio_debug_wav_dump", e))?
|
||||
.map_err(|e| BridgeError::Unmapped(format!("enable_audio_debug_wav_dump: {e}")))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Select the iOS voice-processing mode.
|
||||
pub async fn set_ios_voice_processing_mode(
|
||||
mode: BridgeIosVoiceProcessingMode,
|
||||
) -> Result<(), BridgeError> {
|
||||
let config = BridgeAudioProcessingConfig {
|
||||
route: BridgeAudioRoute::Speaker,
|
||||
ios_mode: mode,
|
||||
processing_backend: match mode {
|
||||
BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => {
|
||||
BridgeAudioBackend::PlatformVoiceProcessing
|
||||
}
|
||||
BridgeIosVoiceProcessingMode::SonoraExperimental => BridgeAudioBackend::Sonora,
|
||||
},
|
||||
vad_backend: BridgeVadBackend::SileroOnnx,
|
||||
aec: match mode {
|
||||
BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => BridgeEffectOwner::Platform,
|
||||
BridgeIosVoiceProcessingMode::SonoraExperimental => BridgeEffectOwner::Sonora,
|
||||
},
|
||||
ns: match mode {
|
||||
BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => BridgeEffectOwner::Platform,
|
||||
BridgeIosVoiceProcessingMode::SonoraExperimental => BridgeEffectOwner::Sonora,
|
||||
},
|
||||
agc: match mode {
|
||||
BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => BridgeEffectOwner::Platform,
|
||||
BridgeIosVoiceProcessingMode::SonoraExperimental => BridgeEffectOwner::Sonora,
|
||||
},
|
||||
hpf_enabled: true,
|
||||
limiter_enabled: true,
|
||||
vad_hangover_ms: 500,
|
||||
vad_pre_roll_ms: 160,
|
||||
vad_min_tx_ms: 200,
|
||||
debug_wav_dump_enabled: false,
|
||||
};
|
||||
set_audio_processing_config(config).await
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
|
||||
default_rust_auto_opaque = RustAutoOpaqueMoi,
|
||||
);
|
||||
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.12.0";
|
||||
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1322894465;
|
||||
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1835973251;
|
||||
|
||||
// Section: executor
|
||||
|
||||
@@ -82,6 +82,41 @@ fn wire__crate__api__add_bookmark_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__audio_processing_stats_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "audio_processing_stats",
|
||||
port: Some(port_),
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
deserializer.end();
|
||||
move |context| async move {
|
||||
transform_result_sse::<_, crate::BridgeError>(
|
||||
(move || async move {
|
||||
let output_ok = crate::api::audio_processing_stats().await?;
|
||||
Ok(output_ok)
|
||||
})()
|
||||
.await,
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__audio_stats_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
@@ -261,6 +296,43 @@ fn wire__crate__api__disconnect_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__enable_audio_debug_wav_dump_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "enable_audio_debug_wav_dump",
|
||||
port: Some(port_),
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
let api_enabled = <bool>::sse_decode(&mut deserializer);
|
||||
deserializer.end();
|
||||
move |context| async move {
|
||||
transform_result_sse::<_, crate::BridgeError>(
|
||||
(move || async move {
|
||||
let output_ok =
|
||||
crate::api::enable_audio_debug_wav_dump(api_enabled).await?;
|
||||
Ok(output_ok)
|
||||
})()
|
||||
.await,
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__events_stream_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
@@ -495,6 +567,37 @@ fn wire__crate__api__handle_interruption_ended_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__handle_media_services_reset_impl(
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "handle_media_services_reset",
|
||||
port: None,
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
deserializer.end();
|
||||
transform_result_sse::<_, ()>((move || {
|
||||
let output_ok = Result::<_, ()>::Ok({
|
||||
crate::api::handle_media_services_reset();
|
||||
})?;
|
||||
Ok(output_ok)
|
||||
})())
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__handle_route_change_impl(
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
@@ -516,10 +619,11 @@ fn wire__crate__api__handle_route_change_impl(
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
let api_route = <crate::api::BridgeAudioRoute>::sse_decode(&mut deserializer);
|
||||
deserializer.end();
|
||||
transform_result_sse::<_, ()>((move || {
|
||||
let output_ok = Result::<_, ()>::Ok({
|
||||
crate::api::handle_route_change();
|
||||
crate::api::handle_route_change(api_route);
|
||||
})?;
|
||||
Ok(output_ok)
|
||||
})())
|
||||
@@ -734,6 +838,43 @@ fn wire__crate__api__ptt_descriptor_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__set_audio_processing_config_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "set_audio_processing_config",
|
||||
port: Some(port_),
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
let api_config =
|
||||
<crate::api::BridgeAudioProcessingConfig>::sse_decode(&mut deserializer);
|
||||
deserializer.end();
|
||||
move |context| async move {
|
||||
transform_result_sse::<_, crate::BridgeError>(
|
||||
(move || async move {
|
||||
let output_ok = crate::api::set_audio_processing_config(api_config).await?;
|
||||
Ok(output_ok)
|
||||
})()
|
||||
.await,
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__set_hard_mute_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
@@ -806,6 +947,43 @@ fn wire__crate__api__set_input_muted_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__set_ios_voice_processing_mode_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "set_ios_voice_processing_mode",
|
||||
port: Some(port_),
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
let api_mode =
|
||||
<crate::api::BridgeIosVoiceProcessingMode>::sse_decode(&mut deserializer);
|
||||
deserializer.end();
|
||||
move |context| async move {
|
||||
transform_result_sse::<_, crate::BridgeError>(
|
||||
(move || async move {
|
||||
let output_ok = crate::api::set_ios_voice_processing_mode(api_mode).await?;
|
||||
Ok(output_ok)
|
||||
})()
|
||||
.await,
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__set_network_state_impl(
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
@@ -1056,6 +1234,42 @@ fn wire__crate__api__set_transmit_mode_impl(
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__set_vad_model_path_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
rust_vec_len_: i32,
|
||||
data_len_: i32,
|
||||
) {
|
||||
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
|
||||
flutter_rust_bridge::for_generated::TaskInfo {
|
||||
debug_name: "set_vad_model_path",
|
||||
port: Some(port_),
|
||||
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
||||
},
|
||||
move || {
|
||||
let message = unsafe {
|
||||
flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
|
||||
ptr_,
|
||||
rust_vec_len_,
|
||||
data_len_,
|
||||
)
|
||||
};
|
||||
let mut deserializer =
|
||||
flutter_rust_bridge::for_generated::SseDeserializer::new(message);
|
||||
let api_path = <String>::sse_decode(&mut deserializer);
|
||||
deserializer.end();
|
||||
move |context| async move {
|
||||
transform_result_sse::<_, crate::BridgeError>(
|
||||
(move || async move {
|
||||
let output_ok = crate::api::set_vad_model_path(api_path).await?;
|
||||
Ok(output_ok)
|
||||
})()
|
||||
.await,
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
fn wire__crate__api__snapshot_impl(
|
||||
port_: flutter_rust_bridge::for_generated::MessagePort,
|
||||
ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
||||
@@ -1236,6 +1450,117 @@ impl SseDecode for bool {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeAudioBackend {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut inner = <i32>::sse_decode(deserializer);
|
||||
return match inner {
|
||||
0 => crate::api::BridgeAudioBackend::PlatformVoiceProcessing,
|
||||
1 => crate::api::BridgeAudioBackend::Sonora,
|
||||
2 => crate::api::BridgeAudioBackend::WebrtcApm,
|
||||
3 => crate::api::BridgeAudioBackend::Noop,
|
||||
_ => unreachable!("Invalid variant for BridgeAudioBackend: {}", inner),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeAudioProcessingConfig {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut var_route = <crate::api::BridgeAudioRoute>::sse_decode(deserializer);
|
||||
let mut var_iosMode = <crate::api::BridgeIosVoiceProcessingMode>::sse_decode(deserializer);
|
||||
let mut var_processingBackend = <crate::api::BridgeAudioBackend>::sse_decode(deserializer);
|
||||
let mut var_vadBackend = <crate::api::BridgeVadBackend>::sse_decode(deserializer);
|
||||
let mut var_aec = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
|
||||
let mut var_ns = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
|
||||
let mut var_agc = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
|
||||
let mut var_hpfEnabled = <bool>::sse_decode(deserializer);
|
||||
let mut var_limiterEnabled = <bool>::sse_decode(deserializer);
|
||||
let mut var_vadHangoverMs = <u32>::sse_decode(deserializer);
|
||||
let mut var_vadPreRollMs = <u32>::sse_decode(deserializer);
|
||||
let mut var_vadMinTxMs = <u32>::sse_decode(deserializer);
|
||||
let mut var_debugWavDumpEnabled = <bool>::sse_decode(deserializer);
|
||||
return crate::api::BridgeAudioProcessingConfig {
|
||||
route: var_route,
|
||||
ios_mode: var_iosMode,
|
||||
processing_backend: var_processingBackend,
|
||||
vad_backend: var_vadBackend,
|
||||
aec: var_aec,
|
||||
ns: var_ns,
|
||||
agc: var_agc,
|
||||
hpf_enabled: var_hpfEnabled,
|
||||
limiter_enabled: var_limiterEnabled,
|
||||
vad_hangover_ms: var_vadHangoverMs,
|
||||
vad_pre_roll_ms: var_vadPreRollMs,
|
||||
vad_min_tx_ms: var_vadMinTxMs,
|
||||
debug_wav_dump_enabled: var_debugWavDumpEnabled,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeAudioProcessingStats {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut var_inputDbfs = <f32>::sse_decode(deserializer);
|
||||
let mut var_renderDbfs = <f32>::sse_decode(deserializer);
|
||||
let mut var_processedDbfs = <f32>::sse_decode(deserializer);
|
||||
let mut var_vadProbability = <f32>::sse_decode(deserializer);
|
||||
let mut var_vadActive = <bool>::sse_decode(deserializer);
|
||||
let mut var_transmitting = <bool>::sse_decode(deserializer);
|
||||
let mut var_vadBackend = <crate::api::BridgeVadBackend>::sse_decode(deserializer);
|
||||
let mut var_vadFallbackActive = <bool>::sse_decode(deserializer);
|
||||
let mut var_processingBackend = <crate::api::BridgeAudioBackend>::sse_decode(deserializer);
|
||||
let mut var_iosVoiceProcessingMode =
|
||||
<crate::api::BridgeIosVoiceProcessingMode>::sse_decode(deserializer);
|
||||
let mut var_audioRoute = <crate::api::BridgeAudioRoute>::sse_decode(deserializer);
|
||||
let mut var_actualSampleRateHz = <u32>::sse_decode(deserializer);
|
||||
let mut var_actualIoBufferFrames = <u32>::sse_decode(deserializer);
|
||||
let mut var_inputOverruns = <u64>::sse_decode(deserializer);
|
||||
let mut var_outputUnderruns = <u64>::sse_decode(deserializer);
|
||||
let mut var_callbackXruns = <u64>::sse_decode(deserializer);
|
||||
let mut var_clippedSamples = <u64>::sse_decode(deserializer);
|
||||
let mut var_sonoraEnabled = <bool>::sse_decode(deserializer);
|
||||
let mut var_platformVoiceProcessingEnabled = <bool>::sse_decode(deserializer);
|
||||
return crate::api::BridgeAudioProcessingStats {
|
||||
input_dbfs: var_inputDbfs,
|
||||
render_dbfs: var_renderDbfs,
|
||||
processed_dbfs: var_processedDbfs,
|
||||
vad_probability: var_vadProbability,
|
||||
vad_active: var_vadActive,
|
||||
transmitting: var_transmitting,
|
||||
vad_backend: var_vadBackend,
|
||||
vad_fallback_active: var_vadFallbackActive,
|
||||
processing_backend: var_processingBackend,
|
||||
ios_voice_processing_mode: var_iosVoiceProcessingMode,
|
||||
audio_route: var_audioRoute,
|
||||
actual_sample_rate_hz: var_actualSampleRateHz,
|
||||
actual_io_buffer_frames: var_actualIoBufferFrames,
|
||||
input_overruns: var_inputOverruns,
|
||||
output_underruns: var_outputUnderruns,
|
||||
callback_xruns: var_callbackXruns,
|
||||
clipped_samples: var_clippedSamples,
|
||||
sonora_enabled: var_sonoraEnabled,
|
||||
platform_voice_processing_enabled: var_platformVoiceProcessingEnabled,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeAudioRoute {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut inner = <i32>::sse_decode(deserializer);
|
||||
return match inner {
|
||||
0 => crate::api::BridgeAudioRoute::Speaker,
|
||||
1 => crate::api::BridgeAudioRoute::Earpiece,
|
||||
2 => crate::api::BridgeAudioRoute::WiredHeadset,
|
||||
3 => crate::api::BridgeAudioRoute::BluetoothHfp,
|
||||
4 => crate::api::BridgeAudioRoute::BluetoothA2dp,
|
||||
5 => crate::api::BridgeAudioRoute::Unknown,
|
||||
_ => unreachable!("Invalid variant for BridgeAudioRoute: {}", inner),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeAudioStats {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
@@ -1275,13 +1600,13 @@ impl SseDecode for crate::api::BridgeChannel {
|
||||
let mut var_parent = <u64>::sse_decode(deserializer);
|
||||
let mut var_name = <String>::sse_decode(deserializer);
|
||||
let mut var_order = <i64>::sse_decode(deserializer);
|
||||
let mut var_has_password = <bool>::sse_decode(deserializer);
|
||||
let mut var_hasPassword = <bool>::sse_decode(deserializer);
|
||||
return crate::api::BridgeChannel {
|
||||
id: var_id,
|
||||
parent: var_parent,
|
||||
name: var_name,
|
||||
order: var_order,
|
||||
has_password: var_has_password,
|
||||
has_password: var_hasPassword,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1292,22 +1617,37 @@ impl SseDecode for crate::api::BridgeClient {
|
||||
let mut var_id = <u64>::sse_decode(deserializer);
|
||||
let mut var_channel = <u64>::sse_decode(deserializer);
|
||||
let mut var_name = <String>::sse_decode(deserializer);
|
||||
let mut var_input_muted = <bool>::sse_decode(deserializer);
|
||||
let mut var_output_muted = <bool>::sse_decode(deserializer);
|
||||
let mut var_is_speaking = <bool>::sse_decode(deserializer);
|
||||
let mut var_inputMuted = <bool>::sse_decode(deserializer);
|
||||
let mut var_outputMuted = <bool>::sse_decode(deserializer);
|
||||
let mut var_isSpeaking = <bool>::sse_decode(deserializer);
|
||||
let mut var_isServerQuery = <bool>::sse_decode(deserializer);
|
||||
return crate::api::BridgeClient {
|
||||
id: var_id,
|
||||
channel: var_channel,
|
||||
name: var_name,
|
||||
input_muted: var_input_muted,
|
||||
output_muted: var_output_muted,
|
||||
is_speaking: var_is_speaking,
|
||||
input_muted: var_inputMuted,
|
||||
output_muted: var_outputMuted,
|
||||
is_speaking: var_isSpeaking,
|
||||
is_server_query: var_isServerQuery,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeEffectOwner {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut inner = <i32>::sse_decode(deserializer);
|
||||
return match inner {
|
||||
0 => crate::api::BridgeEffectOwner::Platform,
|
||||
1 => crate::api::BridgeEffectOwner::Sonora,
|
||||
2 => crate::api::BridgeEffectOwner::WebrtcApm,
|
||||
3 => crate::api::BridgeEffectOwner::Conservative,
|
||||
4 => crate::api::BridgeEffectOwner::Off,
|
||||
_ => unreachable!("Invalid variant for BridgeEffectOwner: {}", inner),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::BridgeError {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
@@ -1455,6 +1795,21 @@ impl SseDecode for crate::api::BridgeEvent {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeIosVoiceProcessingMode {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut inner = <i32>::sse_decode(deserializer);
|
||||
return match inner {
|
||||
0 => crate::api::BridgeIosVoiceProcessingMode::PlatformVoiceProcessing,
|
||||
1 => crate::api::BridgeIosVoiceProcessingMode::SonoraExperimental,
|
||||
_ => unreachable!(
|
||||
"Invalid variant for BridgeIosVoiceProcessingMode: {}",
|
||||
inner
|
||||
),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeNetworkState {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
@@ -1516,6 +1871,21 @@ impl SseDecode for crate::api::BridgeTransmitMode {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeVadBackend {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
let mut inner = <i32>::sse_decode(deserializer);
|
||||
return match inner {
|
||||
0 => crate::api::BridgeVadBackend::SileroOnnx,
|
||||
1 => crate::api::BridgeVadBackend::TenVad,
|
||||
2 => crate::api::BridgeVadBackend::WebrtcVad,
|
||||
3 => crate::api::BridgeVadBackend::EnergyDebug,
|
||||
4 => crate::api::BridgeVadBackend::Disabled,
|
||||
_ => unreachable!("Invalid variant for BridgeVadBackend: {}", inner),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl SseDecode for crate::api::BridgeVoiceJoinErrorCode {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
||||
@@ -1712,32 +2082,39 @@ fn pde_ffi_dispatcher_primary_impl(
|
||||
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
||||
match func_id {
|
||||
1 => wire__crate__api__add_bookmark_impl(port, ptr, rust_vec_len, data_len),
|
||||
2 => wire__crate__api__audio_stats_impl(port, ptr, rust_vec_len, data_len),
|
||||
3 => wire__crate__api__bridge_init_impl(port, ptr, rust_vec_len, data_len),
|
||||
4 => wire__crate__api__connect_impl(port, ptr, rust_vec_len, data_len),
|
||||
5 => wire__crate__api__delete_bookmark_impl(port, ptr, rust_vec_len, data_len),
|
||||
6 => wire__crate__api__disconnect_impl(port, ptr, rust_vec_len, data_len),
|
||||
7 => wire__crate__api__events_stream_impl(port, ptr, rust_vec_len, data_len),
|
||||
9 => wire__crate__api__get_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
|
||||
10 => wire__crate__api__get_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
|
||||
11 => wire__crate__api__get_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
|
||||
15 => wire__crate__api__init_storage_impl(port, ptr, rust_vec_len, data_len),
|
||||
16 => wire__crate__api__is_connected_impl(port, ptr, rust_vec_len, data_len),
|
||||
17 => wire__crate__api__list_bookmarks_impl(port, ptr, rust_vec_len, data_len),
|
||||
19 => wire__crate__api__move_to_channel_impl(port, ptr, rust_vec_len, data_len),
|
||||
20 => wire__crate__api__ptt_descriptor_impl(port, ptr, rust_vec_len, data_len),
|
||||
21 => wire__crate__api__set_hard_mute_impl(port, ptr, rust_vec_len, data_len),
|
||||
22 => wire__crate__api__set_input_muted_impl(port, ptr, rust_vec_len, data_len),
|
||||
24 => wire__crate__api__set_output_gain_impl(port, ptr, rust_vec_len, data_len),
|
||||
25 => wire__crate__api__set_output_muted_impl(port, ptr, rust_vec_len, data_len),
|
||||
26 => wire__crate__api__set_ptt_impl(port, ptr, rust_vec_len, data_len),
|
||||
27 => wire__crate__api__set_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
|
||||
28 => wire__crate__api__set_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
|
||||
29 => wire__crate__api__set_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
|
||||
30 => wire__crate__api__snapshot_impl(port, ptr, rust_vec_len, data_len),
|
||||
31 => wire__crate__api__update_bookmark_impl(port, ptr, rust_vec_len, data_len),
|
||||
32 => wire__crate__api__voice_join_impl(port, ptr, rust_vec_len, data_len),
|
||||
33 => wire__crate__api__voice_leave_impl(port, ptr, rust_vec_len, data_len),
|
||||
2 => wire__crate__api__audio_processing_stats_impl(port, ptr, rust_vec_len, data_len),
|
||||
3 => wire__crate__api__audio_stats_impl(port, ptr, rust_vec_len, data_len),
|
||||
4 => wire__crate__api__bridge_init_impl(port, ptr, rust_vec_len, data_len),
|
||||
5 => wire__crate__api__connect_impl(port, ptr, rust_vec_len, data_len),
|
||||
6 => wire__crate__api__delete_bookmark_impl(port, ptr, rust_vec_len, data_len),
|
||||
7 => wire__crate__api__disconnect_impl(port, ptr, rust_vec_len, data_len),
|
||||
8 => wire__crate__api__enable_audio_debug_wav_dump_impl(port, ptr, rust_vec_len, data_len),
|
||||
9 => wire__crate__api__events_stream_impl(port, ptr, rust_vec_len, data_len),
|
||||
11 => wire__crate__api__get_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
|
||||
12 => wire__crate__api__get_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
|
||||
13 => wire__crate__api__get_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
|
||||
18 => wire__crate__api__init_storage_impl(port, ptr, rust_vec_len, data_len),
|
||||
19 => wire__crate__api__is_connected_impl(port, ptr, rust_vec_len, data_len),
|
||||
20 => wire__crate__api__list_bookmarks_impl(port, ptr, rust_vec_len, data_len),
|
||||
22 => wire__crate__api__move_to_channel_impl(port, ptr, rust_vec_len, data_len),
|
||||
23 => wire__crate__api__ptt_descriptor_impl(port, ptr, rust_vec_len, data_len),
|
||||
24 => wire__crate__api__set_audio_processing_config_impl(port, ptr, rust_vec_len, data_len),
|
||||
25 => wire__crate__api__set_hard_mute_impl(port, ptr, rust_vec_len, data_len),
|
||||
26 => wire__crate__api__set_input_muted_impl(port, ptr, rust_vec_len, data_len),
|
||||
27 => {
|
||||
wire__crate__api__set_ios_voice_processing_mode_impl(port, ptr, rust_vec_len, data_len)
|
||||
}
|
||||
29 => wire__crate__api__set_output_gain_impl(port, ptr, rust_vec_len, data_len),
|
||||
30 => wire__crate__api__set_output_muted_impl(port, ptr, rust_vec_len, data_len),
|
||||
31 => wire__crate__api__set_ptt_impl(port, ptr, rust_vec_len, data_len),
|
||||
32 => wire__crate__api__set_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
|
||||
33 => wire__crate__api__set_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
|
||||
34 => wire__crate__api__set_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
|
||||
35 => wire__crate__api__set_vad_model_path_impl(port, ptr, rust_vec_len, data_len),
|
||||
36 => wire__crate__api__snapshot_impl(port, ptr, rust_vec_len, data_len),
|
||||
37 => wire__crate__api__update_bookmark_impl(port, ptr, rust_vec_len, data_len),
|
||||
38 => wire__crate__api__voice_join_impl(port, ptr, rust_vec_len, data_len),
|
||||
39 => wire__crate__api__voice_leave_impl(port, ptr, rust_vec_len, data_len),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
@@ -1750,18 +2127,136 @@ fn pde_ffi_dispatcher_sync_impl(
|
||||
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
|
||||
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
||||
match func_id {
|
||||
8 => wire__crate__api__export_diagnostics_impl(ptr, rust_vec_len, data_len),
|
||||
12 => wire__crate__api__handle_interruption_began_impl(ptr, rust_vec_len, data_len),
|
||||
13 => wire__crate__api__handle_interruption_ended_impl(ptr, rust_vec_len, data_len),
|
||||
14 => wire__crate__api__handle_route_change_impl(ptr, rust_vec_len, data_len),
|
||||
18 => wire__crate__api__log_file_path_str_impl(ptr, rust_vec_len, data_len),
|
||||
23 => wire__crate__api__set_network_state_impl(ptr, rust_vec_len, data_len),
|
||||
10 => wire__crate__api__export_diagnostics_impl(ptr, rust_vec_len, data_len),
|
||||
14 => wire__crate__api__handle_interruption_began_impl(ptr, rust_vec_len, data_len),
|
||||
15 => wire__crate__api__handle_interruption_ended_impl(ptr, rust_vec_len, data_len),
|
||||
16 => wire__crate__api__handle_media_services_reset_impl(ptr, rust_vec_len, data_len),
|
||||
17 => wire__crate__api__handle_route_change_impl(ptr, rust_vec_len, data_len),
|
||||
21 => wire__crate__api__log_file_path_str_impl(ptr, rust_vec_len, data_len),
|
||||
28 => wire__crate__api__set_network_state_impl(ptr, rust_vec_len, data_len),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Section: rust2dart
|
||||
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioBackend {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
Self::PlatformVoiceProcessing => 0.into_dart(),
|
||||
Self::Sonora => 1.into_dart(),
|
||||
Self::WebrtcApm => 2.into_dart(),
|
||||
Self::Noop => 3.into_dart(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
||||
for crate::api::BridgeAudioBackend
|
||||
{
|
||||
}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioBackend>
|
||||
for crate::api::BridgeAudioBackend
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeAudioBackend {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioProcessingConfig {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
[
|
||||
self.route.into_into_dart().into_dart(),
|
||||
self.ios_mode.into_into_dart().into_dart(),
|
||||
self.processing_backend.into_into_dart().into_dart(),
|
||||
self.vad_backend.into_into_dart().into_dart(),
|
||||
self.aec.into_into_dart().into_dart(),
|
||||
self.ns.into_into_dart().into_dart(),
|
||||
self.agc.into_into_dart().into_dart(),
|
||||
self.hpf_enabled.into_into_dart().into_dart(),
|
||||
self.limiter_enabled.into_into_dart().into_dart(),
|
||||
self.vad_hangover_ms.into_into_dart().into_dart(),
|
||||
self.vad_pre_roll_ms.into_into_dart().into_dart(),
|
||||
self.vad_min_tx_ms.into_into_dart().into_dart(),
|
||||
self.debug_wav_dump_enabled.into_into_dart().into_dart(),
|
||||
]
|
||||
.into_dart()
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
||||
for crate::api::BridgeAudioProcessingConfig
|
||||
{
|
||||
}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioProcessingConfig>
|
||||
for crate::api::BridgeAudioProcessingConfig
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeAudioProcessingConfig {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioProcessingStats {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
[
|
||||
self.input_dbfs.into_into_dart().into_dart(),
|
||||
self.render_dbfs.into_into_dart().into_dart(),
|
||||
self.processed_dbfs.into_into_dart().into_dart(),
|
||||
self.vad_probability.into_into_dart().into_dart(),
|
||||
self.vad_active.into_into_dart().into_dart(),
|
||||
self.transmitting.into_into_dart().into_dart(),
|
||||
self.vad_backend.into_into_dart().into_dart(),
|
||||
self.vad_fallback_active.into_into_dart().into_dart(),
|
||||
self.processing_backend.into_into_dart().into_dart(),
|
||||
self.ios_voice_processing_mode.into_into_dart().into_dart(),
|
||||
self.audio_route.into_into_dart().into_dart(),
|
||||
self.actual_sample_rate_hz.into_into_dart().into_dart(),
|
||||
self.actual_io_buffer_frames.into_into_dart().into_dart(),
|
||||
self.input_overruns.into_into_dart().into_dart(),
|
||||
self.output_underruns.into_into_dart().into_dart(),
|
||||
self.callback_xruns.into_into_dart().into_dart(),
|
||||
self.clipped_samples.into_into_dart().into_dart(),
|
||||
self.sonora_enabled.into_into_dart().into_dart(),
|
||||
self.platform_voice_processing_enabled
|
||||
.into_into_dart()
|
||||
.into_dart(),
|
||||
]
|
||||
.into_dart()
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
||||
for crate::api::BridgeAudioProcessingStats
|
||||
{
|
||||
}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioProcessingStats>
|
||||
for crate::api::BridgeAudioProcessingStats
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeAudioProcessingStats {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioRoute {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
Self::Speaker => 0.into_dart(),
|
||||
Self::Earpiece => 1.into_dart(),
|
||||
Self::WiredHeadset => 2.into_dart(),
|
||||
Self::BluetoothHfp => 3.into_dart(),
|
||||
Self::BluetoothA2dp => 4.into_dart(),
|
||||
Self::Unknown => 5.into_dart(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeAudioRoute {}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioRoute>
|
||||
for crate::api::BridgeAudioRoute
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeAudioRoute {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioStats {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
@@ -1841,6 +2336,27 @@ impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeClient> for crate::api:
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeEffectOwner {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
Self::Platform => 0.into_dart(),
|
||||
Self::Sonora => 1.into_dart(),
|
||||
Self::WebrtcApm => 2.into_dart(),
|
||||
Self::Conservative => 3.into_dart(),
|
||||
Self::Off => 4.into_dart(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeEffectOwner {}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeEffectOwner>
|
||||
for crate::api::BridgeEffectOwner
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeEffectOwner {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::BridgeError {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
@@ -1973,6 +2489,27 @@ impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeEvent> for crate::api::
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeIosVoiceProcessingMode {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
Self::PlatformVoiceProcessing => 0.into_dart(),
|
||||
Self::SonoraExperimental => 1.into_dart(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
||||
for crate::api::BridgeIosVoiceProcessingMode
|
||||
{
|
||||
}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeIosVoiceProcessingMode>
|
||||
for crate::api::BridgeIosVoiceProcessingMode
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeIosVoiceProcessingMode {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeNetworkState {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
@@ -2060,6 +2597,27 @@ impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeTransmitMode>
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeVadBackend {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
Self::SileroOnnx => 0.into_dart(),
|
||||
Self::TenVad => 1.into_dart(),
|
||||
Self::WebrtcVad => 2.into_dart(),
|
||||
Self::EnergyDebug => 3.into_dart(),
|
||||
Self::Disabled => 4.into_dart(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeVadBackend {}
|
||||
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeVadBackend>
|
||||
for crate::api::BridgeVadBackend
|
||||
{
|
||||
fn into_into_dart(self) -> crate::api::BridgeVadBackend {
|
||||
self
|
||||
}
|
||||
}
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
impl flutter_rust_bridge::IntoDart for crate::api::BridgeVoiceJoinErrorCode {
|
||||
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
||||
match self {
|
||||
@@ -2165,6 +2723,91 @@ impl SseEncode for bool {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeAudioBackend {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<i32>::sse_encode(
|
||||
match self {
|
||||
crate::api::BridgeAudioBackend::PlatformVoiceProcessing => 0,
|
||||
crate::api::BridgeAudioBackend::Sonora => 1,
|
||||
crate::api::BridgeAudioBackend::WebrtcApm => 2,
|
||||
crate::api::BridgeAudioBackend::Noop => 3,
|
||||
_ => {
|
||||
unimplemented!("");
|
||||
}
|
||||
},
|
||||
serializer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeAudioProcessingConfig {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<crate::api::BridgeAudioRoute>::sse_encode(self.route, serializer);
|
||||
<crate::api::BridgeIosVoiceProcessingMode>::sse_encode(self.ios_mode, serializer);
|
||||
<crate::api::BridgeAudioBackend>::sse_encode(self.processing_backend, serializer);
|
||||
<crate::api::BridgeVadBackend>::sse_encode(self.vad_backend, serializer);
|
||||
<crate::api::BridgeEffectOwner>::sse_encode(self.aec, serializer);
|
||||
<crate::api::BridgeEffectOwner>::sse_encode(self.ns, serializer);
|
||||
<crate::api::BridgeEffectOwner>::sse_encode(self.agc, serializer);
|
||||
<bool>::sse_encode(self.hpf_enabled, serializer);
|
||||
<bool>::sse_encode(self.limiter_enabled, serializer);
|
||||
<u32>::sse_encode(self.vad_hangover_ms, serializer);
|
||||
<u32>::sse_encode(self.vad_pre_roll_ms, serializer);
|
||||
<u32>::sse_encode(self.vad_min_tx_ms, serializer);
|
||||
<bool>::sse_encode(self.debug_wav_dump_enabled, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeAudioProcessingStats {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<f32>::sse_encode(self.input_dbfs, serializer);
|
||||
<f32>::sse_encode(self.render_dbfs, serializer);
|
||||
<f32>::sse_encode(self.processed_dbfs, serializer);
|
||||
<f32>::sse_encode(self.vad_probability, serializer);
|
||||
<bool>::sse_encode(self.vad_active, serializer);
|
||||
<bool>::sse_encode(self.transmitting, serializer);
|
||||
<crate::api::BridgeVadBackend>::sse_encode(self.vad_backend, serializer);
|
||||
<bool>::sse_encode(self.vad_fallback_active, serializer);
|
||||
<crate::api::BridgeAudioBackend>::sse_encode(self.processing_backend, serializer);
|
||||
<crate::api::BridgeIosVoiceProcessingMode>::sse_encode(
|
||||
self.ios_voice_processing_mode,
|
||||
serializer,
|
||||
);
|
||||
<crate::api::BridgeAudioRoute>::sse_encode(self.audio_route, serializer);
|
||||
<u32>::sse_encode(self.actual_sample_rate_hz, serializer);
|
||||
<u32>::sse_encode(self.actual_io_buffer_frames, serializer);
|
||||
<u64>::sse_encode(self.input_overruns, serializer);
|
||||
<u64>::sse_encode(self.output_underruns, serializer);
|
||||
<u64>::sse_encode(self.callback_xruns, serializer);
|
||||
<u64>::sse_encode(self.clipped_samples, serializer);
|
||||
<bool>::sse_encode(self.sonora_enabled, serializer);
|
||||
<bool>::sse_encode(self.platform_voice_processing_enabled, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeAudioRoute {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<i32>::sse_encode(
|
||||
match self {
|
||||
crate::api::BridgeAudioRoute::Speaker => 0,
|
||||
crate::api::BridgeAudioRoute::Earpiece => 1,
|
||||
crate::api::BridgeAudioRoute::WiredHeadset => 2,
|
||||
crate::api::BridgeAudioRoute::BluetoothHfp => 3,
|
||||
crate::api::BridgeAudioRoute::BluetoothA2dp => 4,
|
||||
crate::api::BridgeAudioRoute::Unknown => 5,
|
||||
_ => {
|
||||
unimplemented!("");
|
||||
}
|
||||
},
|
||||
serializer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeAudioStats {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
@@ -2209,6 +2852,25 @@ impl SseEncode for crate::api::BridgeClient {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeEffectOwner {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<i32>::sse_encode(
|
||||
match self {
|
||||
crate::api::BridgeEffectOwner::Platform => 0,
|
||||
crate::api::BridgeEffectOwner::Sonora => 1,
|
||||
crate::api::BridgeEffectOwner::WebrtcApm => 2,
|
||||
crate::api::BridgeEffectOwner::Conservative => 3,
|
||||
crate::api::BridgeEffectOwner::Off => 4,
|
||||
_ => {
|
||||
unimplemented!("");
|
||||
}
|
||||
},
|
||||
serializer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::BridgeError {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
@@ -2340,6 +3002,22 @@ impl SseEncode for crate::api::BridgeEvent {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeIosVoiceProcessingMode {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<i32>::sse_encode(
|
||||
match self {
|
||||
crate::api::BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => 0,
|
||||
crate::api::BridgeIosVoiceProcessingMode::SonoraExperimental => 1,
|
||||
_ => {
|
||||
unimplemented!("");
|
||||
}
|
||||
},
|
||||
serializer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeNetworkState {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
@@ -2404,6 +3082,25 @@ impl SseEncode for crate::api::BridgeTransmitMode {
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeVadBackend {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
<i32>::sse_encode(
|
||||
match self {
|
||||
crate::api::BridgeVadBackend::SileroOnnx => 0,
|
||||
crate::api::BridgeVadBackend::TenVad => 1,
|
||||
crate::api::BridgeVadBackend::WebrtcVad => 2,
|
||||
crate::api::BridgeVadBackend::EnergyDebug => 3,
|
||||
crate::api::BridgeVadBackend::Disabled => 4,
|
||||
_ => {
|
||||
unimplemented!("");
|
||||
}
|
||||
},
|
||||
serializer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl SseEncode for crate::api::BridgeVoiceJoinErrorCode {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
||||
|
||||
Reference in New Issue
Block a user