CustomCommandsConfig Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. SpeechConfig - com.
microsoft. cognitiveservices. speech. dialog. DialogServiceConfig - com.
microsoft. cognitiveservices. speech. dialog. CustomCommandsConfig
- com.
- com.
- com.
public final class CustomCommandsConfig
extends DialogServiceConfig
Class that defines configurations for the dialog service connector object for using a CustomCommands backend.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Custom |
fromAuthorizationToken(String appId, String authorizationToken, String region)
Creates an instance of Custom Commands config with the specified Custom Commands application id, authorization token and service region. |
static
Custom |
fromSubscription(String appId, String subscription, String region)
Creates an instance of Custom Commands config with the specified Custom Commands application id, subscription and region. |
java.lang.String |
getApplicationId()
Gets the application id. |
void |
setApplicationId(String value)
Sets the application id. |
Methods inherited from SpeechConfig
Methods inherited from DialogServiceConfig
Methods inherited from java.lang.Object
Method Details
fromAuthorizationToken
public static CustomCommandsConfig fromAuthorizationToken(String appId, String authorizationToken, String region)
Creates an instance of Custom Commands config with the specified Custom Commands application id, authorization token and service region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.
Parameters:
Returns:
fromSubscription
public static CustomCommandsConfig fromSubscription(String appId, String subscription, String region)
Creates an instance of Custom Commands config with the specified Custom Commands application id, subscription and region.
Parameters:
Returns:
getApplicationId
public String getApplicationId()
Gets the application id.
Returns:
setApplicationId
public void setApplicationId(String value)
Sets the application id.
Parameters:
Applies to
Azure SDK for Java