use serde::de::DeserializeOwned; use tauri::{plugin::PluginApi, AppHandle, Runtime}; use crate::models::*; pub fn init( app: &AppHandle, _api: PluginApi, ) -> crate::Result> { Ok(NativeTts(app.clone())) } /// Access to the native-tts APIs. pub struct NativeTts(AppHandle); impl NativeTts { pub fn init(&self) -> crate::Result { Err(crate::Error::UnsupportedPlatformError) } pub fn speak(&self, _args: SpeakArgs) -> crate::Result { Err(crate::Error::UnsupportedPlatformError) } pub fn pause(&self) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn resume(&self) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn stop(&self) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn set_rate(&self, _args: SetRateArgs) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn set_pitch(&self, _args: SetPitchArgs) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn set_voice(&self, _args: SetVoiceArgs) -> crate::Result<()> { Err(crate::Error::UnsupportedPlatformError) } pub fn get_all_voices(&self) -> crate::Result { Err(crate::Error::UnsupportedPlatformError) } }