Class BotFrameworkConfig
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.SpeechConfig
-
- com.microsoft.cognitiveservices.speech.dialog.DialogServiceConfig
-
- com.microsoft.cognitiveservices.speech.dialog.BotFrameworkConfig
-
- All Implemented Interfaces:
AutoCloseable
public final class BotFrameworkConfig extends DialogServiceConfig
Class that defines configurations for the dialog service connector object for using a Bot Framework backend.
-
-
Field Summary
-
Fields inherited from class com.microsoft.cognitiveservices.speech.SpeechConfig
speechConfigClass
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BotFrameworkConfigfromAuthorizationToken(String authorizationToken, String region)Creates an instance of a bot framework config with specified authorization token and service region.static BotFrameworkConfigfromAuthorizationToken(String authorizationToken, String region, String botId)Creates an instance of a bot framework config with specified authorization token, service region, and bot ID.static BotFrameworkConfigfromSubscription(String subscription, String region)Creates an instance of the bot framework config with the specified subscription and region.static BotFrameworkConfigfromSubscription(String subscription, String region, String botId)Creates an instance of the bot framework config with the specified subscription, region, and bot ID.-
Methods inherited from class com.microsoft.cognitiveservices.speech.dialog.DialogServiceConfig
close, getImpl, getLanguage, getProperty, getProperty, setLanguage, setProperty, setProperty, setProxy, setServiceProperty
-
Methods inherited from class com.microsoft.cognitiveservices.speech.SpeechConfig
enableAudioLogging, enableDictation, fromEndpoint, fromEndpoint, fromHost, fromHost, getAuthorizationToken, getEndpointId, getOutputFormat, getSpeechRecognitionLanguage, getSpeechSynthesisLanguage, getSpeechSynthesisOutputFormat, getSpeechSynthesisVoiceName, requestWordLevelTimestamps, setAuthorizationToken, setEndpointId, setOutputFormat, setProfanity, setSpeechRecognitionLanguage, setSpeechSynthesisLanguage, setSpeechSynthesisOutputFormat, setSpeechSynthesisVoiceName
-
-
-
-
Method Detail
-
fromSubscription
public static BotFrameworkConfig fromSubscription(String subscription, String region)
Creates an instance of the bot framework config with the specified subscription and region.- Parameters:
subscription- Service subscription key.region- Service region key.- Returns:
- The created config.
-
fromSubscription
public static BotFrameworkConfig fromSubscription(String subscription, String region, String botId)
Creates an instance of the bot framework config with the specified subscription, region, and bot ID.- Parameters:
subscription- Service subscription key.region- Service region key.botId- Identifier used to select a bot associated with this subscription.- Returns:
- The created config.
-
fromAuthorizationToken
public static BotFrameworkConfig fromAuthorizationToken(String authorizationToken, String region)
Creates an instance of a bot framework config with specified 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:
authorizationToken- The authorization token.region- The region name (see the region page).- Returns:
- A speech config instance.
-
fromAuthorizationToken
public static BotFrameworkConfig fromAuthorizationToken(String authorizationToken, String region, String botId)
Creates an instance of a bot framework config with specified authorization token, service region, and bot ID. 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:
authorizationToken- The authorization token.region- The region name (see the region page).botId- Identifier used to select a bot associated with this subscription.- Returns:
- A speech config instance.
-
-