/// Creates an instance of the speech config with specified authorization token and
/// region.
/// Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the
/// caller needs to refresh it by calling this setter with a new valid token.
/// As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers
/// that have already been created.
/// For recognizers that have been created before, you need to set authorization token of the corresponding recognizer
/// to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
Creates an instance of the speech config with specified authorization token and
region.
Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the
caller needs to refresh it by calling this setter with a new valid token.
As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers
that have already been created.
For recognizers that have been created before, you need to set authorization token of the corresponding recognizer
to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
Creates an instance of the speech config with specified authorization token and region . Note : The caller needs to ensure that the authorization token is valid . Before the authorization token expires the caller needs to refresh it by calling this setter with a new valid token . As configuration values are copied when creating a new recognizer the new token value will not apply to recognizers that have already been created . For recognizers that have been created before you need to set authorization token of the corresponding recognizer to refresh the token . Otherwise the recognizers will encounter errors during recognition .
pub fn from_auth_token<S>(auth_token: S, region: S) -> Result<SpeechConfig>
    where
        S: Into<Vec<u8>>,
    {
        let c_auth_token = CString::new(auth_token)?;
        let c_region = CString::new(region)?;
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let ret = speech_config_from_authorization_token(
                &mut handle,
                c_auth_token.as_ptr(),
                c_region.as_ptr(),
            );
            convert_err(ret, "SpeechConfig::from_auth_token error")?;
            SpeechConfig::from_handle(handle)
        }
    }
pub fn from_auth_token < S > ( auth_token : S , region : S ) -> Result < SpeechConfig > where S : Into < Vec < u8 > > , { let c_auth_token = CString :: new ( auth_token ) ? ; let c_region = CString :: new ( region ) ? ; unsafe { let mut handle : SPXSPEECHCONFIGHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let ret = speech_config_from_authorization_token ( & mut handle , c_auth_token . as_ptr ( ) , c_region . as_ptr ( ) , ) ; convert_err ( ret , " " ) ? ; SpeechConfig :: from_handle ( handle ) } }
Creates an instance of the speech config with specified authorization token and
region.
Creates an instance of the speech config with specified authorization token and region .
auth_token
S
region
S