/// Creates a SpeechConfig instance from a valid handle. This is for internal use only.
Creates a SpeechConfig instance from a valid handle. This is for internal use only.
Creates a SpeechConfig instance from a valid handle . This is for internal use only .
pub fn from_handle(handle: SPXHANDLE) -> Result<SpeechConfig> {
        unsafe {
            let mut prop_bag_handle: SPXPROPERTYBAGHANDLE = MaybeUninit::uninit().assume_init();
            let ret = speech_config_get_property_bag(handle, &mut prop_bag_handle);
            convert_err(ret, "SpeechConfig::from_handle error")?;
            let mut property_bag = PropertyCollection::from_handle(prop_bag_handle);
            property_bag
                .set_property_by_string("SPEECHSDK-SPEECH-CONFIG-SYSTEM-LANGUAGE", "Rust")?;
            let result = SpeechConfig {
                handle: SmartHandle::create("SpeechConfig", handle, speech_config_release),
                properties: property_bag,
            };
            Ok(result)
        }
    }
pub fn from_handle ( handle : SPXHANDLE ) -> Result < SpeechConfig > { unsafe { let mut prop_bag_handle : SPXPROPERTYBAGHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let ret = speech_config_get_property_bag ( handle , & mut prop_bag_handle ) ; convert_err ( ret , " " ) ? ; let mut property_bag = PropertyCollection :: from_handle ( prop_bag_handle ) ; property_bag . set_property_by_string ( " " , " " ) ? ; let result = SpeechConfig { handle : SmartHandle :: create ( " " , handle , speech_config_release ) , properties : property_bag , } ; Ok ( result ) } }
Creates a SpeechConfig instance from a valid handle.
Creates a SpeechConfig instance from a valid handle .
handle
SPXHANDLE