SpeechTranslationConfig.FromEndpoint Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| FromEndpoint(Uri) |
Creates an instance of the speech translation config with specified endpoint. Added in 1.5.0 |
| FromEndpoint(Uri, TokenCredential) |
Creates a speech configuration instance using a specified endpoint and AAD token credential. Introduced in version 1.43.0. |
| FromEndpoint(Uri, ApiKeyCredential) |
Creates an instance of speech translation config with a custom endpoint and an API key credential. |
| FromEndpoint(Uri, String) |
Creates an instance of the speech translation config with specified endpoint and subscription key. |
FromEndpoint(Uri)
Creates an instance of the speech translation config with specified endpoint. Added in 1.5.0
public static Microsoft.CognitiveServices.Speech.SpeechTranslationConfig FromEndpoint(Uri endpoint);
static member FromEndpoint : Uri -> Microsoft.CognitiveServices.Speech.SpeechTranslationConfig
Public Shared Function FromEndpoint (endpoint As Uri) As SpeechTranslationConfig
Parameters
- endpoint
- Uri
The service endpoint to connect to.
Returns
A SpeechTranslationConfig instance.
Remarks
* This method is only used for a non-standard resource path or parameter overrides. To change the host name with standard resource paths, use **FromHost** instead. * The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs. For example, if the recognition language is defined in URI as query parameter "language=de-DE", and the property SpeechRecognitionLanguage is set to "en-US", the language setting in URI takes precedence, and the effective language is "de-DE". Only the parameters that are not specified in the endpoint URI can be set by other APIs. * If the endpoint requires a subscription key for authentication, use FromEndpoint(System.Uri, string) to pass the subscription key as parameter. To use an authorization token with FromEndpoint, use this method to create a SpeechTranslationConfig instance, and then set the AuthorizationToken property on the created SpeechTranslationConfig instance.
Applies to
FromEndpoint(Uri, TokenCredential)
Creates a speech configuration instance using a specified endpoint and AAD token credential. Introduced in version 1.43.0.
public static Microsoft.CognitiveServices.Speech.SpeechTranslationConfig FromEndpoint(Uri endpoint, Azure.Core.TokenCredential credential);
static member FromEndpoint : Uri * Azure.Core.TokenCredential -> Microsoft.CognitiveServices.Speech.SpeechTranslationConfig
Public Shared Function FromEndpoint (endpoint As Uri, credential As TokenCredential) As SpeechTranslationConfig
Parameters
- endpoint
- Uri
The service endpoint with a custom domain. For more details, visit: Microsoft Docs.
- credential
- TokenCredential
The AAD token credential used for authentication and token requests.
Returns
A configured instance of SpeechConfig.
Remarks
* The AAD token is automatically refreshed before expiration. * This API is available for **TranslationRecognizer**. * This method is intended for scenarios where a **non-standard resource path** or **custom parameter overrides** are needed. For standard resource paths, use **FromHost** instead to modify the hostname. * Query parameters specified in the **endpoint URI remain unchanged**, even if they are set through other APIs. For example, if the URI contains the query parameter `"language=de-DE"`, but the property `SpeechRecognitionLanguage` is set to `"en-US"`, the URI setting takes precedence, and `"de-DE"` will be used as the recognition language. Only parameters **not defined in the URI** can be modified via other APIs. * If the endpoint requires authentication using a **subscription key**, use `FromEndpoint(System.Uri, string)` to pass the key as a parameter. To authenticate with an **authorization token**, use this method to create a `SpeechTranslationConfig` instance, then set the `AuthorizationToken` property on the created instance.
Applies to
FromEndpoint(Uri, ApiKeyCredential)
Creates an instance of speech translation config with a custom endpoint and an API key credential.
public static Microsoft.CognitiveServices.Speech.SpeechTranslationConfig FromEndpoint(Uri endpoint, System.ClientModel.ApiKeyCredential keyCredential);
static member FromEndpoint : Uri * System.ClientModel.ApiKeyCredential -> Microsoft.CognitiveServices.Speech.SpeechTranslationConfig
Public Shared Function FromEndpoint (endpoint As Uri, keyCredential As ApiKeyCredential) As SpeechTranslationConfig
Parameters
- endpoint
- Uri
The service endpoint to connect to.
- keyCredential
- ApiKeyCredential
The API key credential used to authenticate the request.
Returns
A speech translation config instance.
Remarks
* The query parameters specified in the endpoint URI are not changed, even if they are set by any other API call. For example, if the recognition language is defined in the URI query parameter as "language=de-DE", and the property SpeechRecognitionLanguage is set to "en-US", the language set in the URI takes precedence, and "de-DE" remains the expected language. Since parameters included in the endpoint URI take priority, only parameters that are not specified in the endpoint URI can be set by other APIs. * To use an authorization token with FromEndpoint, use FromEndpoint(System.Uri), and then set the AuthorizationToken property on the new SpeechConfig instance.
Applies to
FromEndpoint(Uri, String)
Creates an instance of the speech translation config with specified endpoint and subscription key.
public static Microsoft.CognitiveServices.Speech.SpeechTranslationConfig FromEndpoint(Uri endpoint, string subscriptionKey);
static member FromEndpoint : Uri * string -> Microsoft.CognitiveServices.Speech.SpeechTranslationConfig
Public Shared Function FromEndpoint (endpoint As Uri, subscriptionKey As String) As SpeechTranslationConfig
Parameters
- endpoint
- Uri
The service endpoint to connect to.
- subscriptionKey
- String
The subscription key. To create or find your key and region, see Find keys and region.
Returns
A SpeechTranslationConfig instance.
Remarks
* This method is only used for a non-standard resource path or parameter overrides. To change the host name with standard resource paths, use **FromHost** instead. * The query parameters specified in the endpoint URI are not changed, even if they are set by any other APIs. For example, if the recognition language is defined in URI as query parameter "language=de-DE", and the property SpeechRecognitionLanguage is set to "en-US", the language setting in URI takes precedence, and the effective language is "de-DE". Only the parameters that are not specified in the endpoint URI can be set by other APIs. * If the endpoint requires a subscription key for authentication, use FromEndpoint(System.Uri, string) to pass the subscription key as parameter. To use an authorization token with FromEndpoint, use this method to create a SpeechTranslationConfig instance, and then set the AuthorizationToken property on the created SpeechTranslationConfig instance.