SpeechConfig.FromHost Method

Definition

Overloads

FromHost(Uri)

Creates an instance of the speech config with specified host. This method is intended only for users who use a non-default service host. Standard resource path will be assumed. For services with a non-standard resource path or no path at all, use FromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: If the host requires a subscription key for authentication, use FromHost(System.Uri, string) to pass the subscription key as parameter. To use an authorization token with FromHost, use this method to create a SpeechConfig instance, and then set the AuthorizationToken property on the created SpeechConfig instance. Note: Added in version 1.8.0.

FromHost(Uri, String)

Creates an instance of the speech config with specified host and subscription key. This method is intended only for users who use a non-default service host. Standard resource path will be assumed. For services with a non-standard resource path or no path at all, use FromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: To use an authorization token with FromHost, use FromHost(System.Uri), and then set the AuthorizationToken property on the created SpeechConfig instance. Note: Added in version 1.8.0.

FromHost(Uri)

Creates an instance of the speech config with specified host. This method is intended only for users who use a non-default service host. Standard resource path will be assumed. For services with a non-standard resource path or no path at all, use FromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: If the host requires a subscription key for authentication, use FromHost(System.Uri, string) to pass the subscription key as parameter. To use an authorization token with FromHost, use this method to create a SpeechConfig instance, and then set the AuthorizationToken property on the created SpeechConfig instance. Note: Added in version 1.8.0.

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

Parameters

host
Uri

The service host to connect to. Format is "protocol://host:port" where ":port" is optional.

Returns

A speech config instance.

FromHost(Uri, String)

Creates an instance of the speech config with specified host and subscription key. This method is intended only for users who use a non-default service host. Standard resource path will be assumed. For services with a non-standard resource path or no path at all, use FromEndpoint instead. Note: Query parameters are not allowed in the host URI and must be set by other APIs. Note: To use an authorization token with FromHost, use FromHost(System.Uri), and then set the AuthorizationToken property on the created SpeechConfig instance. Note: Added in version 1.8.0.

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

Parameters

host
Uri

The service host to connect to. Format is "protocol://host:port" where ":port" is optional.

subscriptionKey
String

The subscription key.

Returns

A speech config instance.

Applies to