Share via


SpeechConfig.FromEndpoint Method

Definition

Overloads

FromEndpoint(Uri)

Creates an instance of the speech config with specified endpoint. Added in 1.5.0

FromEndpoint(Uri, String)

Creates an instance of SpeechConfig with a custom endpoint and subscription key.

FromEndpoint(Uri)

Creates an instance of the speech config with specified endpoint. Added in 1.5.0

public static Microsoft.CognitiveServices.Speech.SpeechConfig FromEndpoint (Uri endpoint);
static member FromEndpoint : Uri -> Microsoft.CognitiveServices.Speech.SpeechConfig
Public Shared Function FromEndpoint (endpoint As Uri) As SpeechConfig

Parameters

endpoint
Uri

The service endpoint to connect to.

Returns

A speech config 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. Note that whether a specific query parameter is supported or not, depends on the endpoint and scenario. 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". The example only applies when the endpoint and scenario combination supports language as a query parameter. 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 SpeechConfig instance, and then set the AuthorizationToken property on the created SpeechConfig instance.

Applies to

FromEndpoint(Uri, String)

Creates an instance of SpeechConfig with a custom endpoint and subscription key.

public static Microsoft.CognitiveServices.Speech.SpeechConfig FromEndpoint (Uri endpoint, string subscriptionKey);
static member FromEndpoint : Uri * string -> Microsoft.CognitiveServices.Speech.SpeechConfig
Public Shared Function FromEndpoint (endpoint As Uri, subscriptionKey As String) As SpeechConfig

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 speech config 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 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