다음을 통해 공유


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. Added in 1.

FromHost(Uri, String)

Creates a SpeechConfig instance with a specific 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. Added in 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. Added in 1.

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.

Remarks

* Query parameters are not allowed in the host URI and must be set by other APIs. * If the host requires a subscription key for authentication, use FromHost(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.

Applies to

FromHost(Uri, String)

Creates a SpeechConfig instance with a specific 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. Added in 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. To create or find your key and region, see Find keys and region.

Returns

A speech config instance.

Remarks

* Query parameters are not allowed in the host URI and must be set by other APIs. * To use an authorization token with **FromHost**, use **FromHost(System.Uri)**, and then set the **AuthorizationToken** property on the created **SpeechConfig** instance.

Applies to