pub struct Config { /* private fields */ }
Expand description
The configuration for the recognizer.
The configuration is used to set the parameters of the speech recognition.
Implementations§
Source§impl Config
impl Config
Sourcepub fn enable_audio_logging(self) -> Self
pub fn enable_audio_logging(self) -> Self
Enable audio logging in service.
Audio and content logs are stored either in Microsoft-owned storage, or in your own storage account linked to your Cognitive Services subscription (Bring Your Own Storage (BYOS) enabled Speech resource). The logs will be removed after 30 days.
Sourcepub fn set_device(self, device: Device) -> Self
pub fn set_device(self, device: Device) -> Self
Set Device information.
The device information is used to provide information about the source. Some default values are already set.
Sourcepub fn set_profanity(self, profanity: Profanity) -> Self
pub fn set_profanity(self, profanity: Profanity) -> Self
Mask the profanity.
Sourcepub fn set_language(self, language: Language) -> Self
pub fn set_language(self, language: Language) -> Self
Set the default language for the recognition.
If needed multiple language detection, use the set_detect_languages method.
Sourcepub fn set_detect_languages(
self,
languages: Vec<Language>,
language_detect_mode: LanguageDetectMode,
) -> Self
pub fn set_detect_languages( self, languages: Vec<Language>, language_detect_mode: LanguageDetectMode, ) -> Self
Instruct to detect the languages from the audio.
The language detection is used to detect the language of the audio. This could not match the language of the audio, but it is used to provide better recognition.
Sourcepub fn set_phrases(self, phrases: Vec<String>) -> Self
pub fn set_phrases(self, phrases: Vec<String>) -> Self
Helping phrases to detect better the context.
Untested.
Sourcepub fn set_custom_models(self, custom_models: Vec<(String, String)>) -> Self
pub fn set_custom_models(self, custom_models: Vec<(String, String)>) -> Self
Use custom Models.
Untested.
Sourcepub fn set_recognition_mode(self, mode: RecognitionMode) -> Self
pub fn set_recognition_mode(self, mode: RecognitionMode) -> Self
Set the recognition mode.
Only the Conversation mode was tested.
Sourcepub fn set_output_format(self, format: OutputFormat) -> Self
pub fn set_output_format(self, format: OutputFormat) -> Self
Set the output format of event responses.
You will find the json in each event with Message.json() method.