/// Executes the speech synthesis on SSML, asynchronously.
Executes the speech synthesis on SSML, asynchronously.
Executes the speech synthesis on SSML asynchronously .
pub async fn speak_ssml_async(&self, ssml: &str) -> Result<SpeechSynthesisResult> {
        unsafe {
            let c_ssml = CString::new(ssml)?;
            let ssml_len = c_ssml.as_bytes().len();
            let mut result_handle: SPXRESULTHANDLE = MaybeUninit::uninit().assume_init();
            let ret = synthesizer_speak_ssml(
                self.handle.inner(),
                c_ssml.as_ptr(),
                ssml_len as u32,
                &mut result_handle,
            );
            convert_err(ret, "SpeechSynthesizer.speak_ssml_async error")?;
            SpeechSynthesisResult::from_handle(result_handle)
        }
    }
pub async fn speak_ssml_async ( & self , ssml : & str ) -> Result < SpeechSynthesisResult > { unsafe { let c_ssml = CString :: new ( ssml ) ? ; let ssml_len = c_ssml . as_bytes ( ) . len ( ) ; let mut result_handle : SPXRESULTHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let ret = synthesizer_speak_ssml ( self . handle . inner ( ) , c_ssml . as_ptr ( ) , ssml_len as u32 , & mut result_handle , ) ; convert_err ( ret , " " ) ? ; SpeechSynthesisResult :: from_handle ( result_handle ) } }
Executes the speech synthesis on SSML, asynchronously.
Executes the speech synthesis on SSML asynchronously .
&self
ssml
&str