/// Starts the speech synthesis on SSML, asynchronously.
/// It returns when the synthesis request is started to process
///(the result reason is SynthesizingAudioStarted).
Starts the speech synthesis on SSML, asynchronously.
It returns when the synthesis request is started to process
(the result reason is SynthesizingAudioStarted).
Starts the speech synthesis on SSML asynchronously . It returns when the synthesis request is started to process ( the result reason is SynthesizingAudioStarted ) .
pub async fn start_speaking_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_start_speaking_ssml(
                self.handle.inner(),
                c_ssml.as_ptr(),
                ssml_len as u32,
                &mut result_handle,
            );
            convert_err(ret, "SpeechSynthesizer.start_speaking_ssml_async error")?;
            SpeechSynthesisResult::from_handle(result_handle)
        }
    }
pub async fn start_speaking_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_start_speaking_ssml ( self . handle . inner ( ) , c_ssml . as_ptr ( ) , ssml_len as u32 , & mut result_handle , ) ; convert_err ( ret , " " ) ? ; SpeechSynthesisResult :: from_handle ( result_handle ) } }
Starts the speech synthesis on SSML, asynchronously.
Starts the speech synthesis on SSML asynchronously .
&self
ssml
&str