You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Use a custom model for automatic language detection
101
117
102
118
In addition to language detection using Speech service models, you can specify a custom model for enhanced recognition. If a custom model isn't provided, the service will use the default language model.
Next, specify the source language of your audio with `speech_recognition_language`:
119
+
In this example, the source language is provided using `SourceLanguageConfig`. Then, the `SourceLanguageConfig` is passed as a parameter to `SpeechRecognizer` construct.
If you're using a custom model for recognition, you can specify the endpoint with `endpoint_id`:
127
+
In this example, the source language and custom endpoint are provided using `SourceLanguageConfig`. Then, the `SourceLanguageConfig` is passed as a parameter to `SpeechRecognizer` construct.
126
128
127
129
```Python
128
-
speech_config.endpoint_id ="The Endpoint ID for your custom model."
130
+
source_language_config = speechsdk.languageconfig.SourceLanguageConfig("de-DE", "The Endpoint ID for your custom model.")
> `speech_recognition_language` and `endpoint_id` properties are deprecated from the `SpeechConfig` class in Python. The use of these properties are discouraged, and shouldn't be used when constructing a `SpeechRecognizer`.
0 commit comments