Class DialogServiceConfig
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.SpeechConfig
-
- com.microsoft.cognitiveservices.speech.dialog.DialogServiceConfig
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BotFrameworkConfig,CustomCommandsConfig
public class DialogServiceConfig extends SpeechConfig implements AutoCloseable
Class that defines base configurations for dialog service connector. Note: close() must be called in order to release underlying resources held by the object.
-
-
Field Summary
-
Fields inherited from class com.microsoft.cognitiveservices.speech.SpeechConfig
speechConfigClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDialogServiceConfig(long handleValue)Creates an instance of dialog service config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Dispose of associated resources.SafeHandlegetImpl()Returns the dialog service configuration.StringgetLanguage()Gets the languageStringgetProperty(PropertyId id)Gets the property by propertyId.StringgetProperty(String name)Gets a named property as value.voidsetLanguage(String value)Sets the languagevoidsetProperty(PropertyId id, String value)Sets the property by propertyId.voidsetProperty(String name, String value)Sets a named property as value.voidsetProxy(String proxyHostName, int proxyPort, String proxyUserName, String proxyPassword)Sets proxy configuration Note: Proxy functionality is not available on macOS.voidsetServiceProperty(String name, String value, ServicePropertyChannel channel)Sets a property value that will be passed to service using the specified channel.-
Methods inherited from class com.microsoft.cognitiveservices.speech.SpeechConfig
enableAudioLogging, enableDictation, fromAuthorizationToken, fromEndpoint, fromEndpoint, fromHost, fromHost, fromSubscription, getAuthorizationToken, getEndpointId, getOutputFormat, getSpeechRecognitionLanguage, getSpeechSynthesisLanguage, getSpeechSynthesisOutputFormat, getSpeechSynthesisVoiceName, requestWordLevelTimestamps, setAuthorizationToken, setEndpointId, setOutputFormat, setProfanity, setSpeechRecognitionLanguage, setSpeechSynthesisLanguage, setSpeechSynthesisOutputFormat, setSpeechSynthesisVoiceName
-
-
-
-
Method Detail
-
setProxy
public void setProxy(String proxyHostName, int proxyPort, String proxyUserName, String proxyPassword)
Sets proxy configuration Note: Proxy functionality is not available on macOS. This function will have no effect on this platform.- Overrides:
setProxyin classSpeechConfig- Parameters:
proxyHostName- the host name of the proxy server, without the protocol scheme (http://)proxyPort- the port number of the proxy server.proxyUserName- the user name of the proxy server. Use empty string if no user name is needed.proxyPassword- the password of the proxy server. Use empty string if no user password is needed.
-
setProperty
public void setProperty(String name, String value)
Sets a named property as value.- Overrides:
setPropertyin classSpeechConfig- Parameters:
name- the name of the property.value- the value.
-
setProperty
public void setProperty(PropertyId id, String value)
Sets the property by propertyId.- Overrides:
setPropertyin classSpeechConfig- Parameters:
id- PropertyId of the property.value- The value.
-
getProperty
public String getProperty(String name)
Gets a named property as value.- Overrides:
getPropertyin classSpeechConfig- Parameters:
name- the name of the property.- Returns:
- The value.
-
getProperty
public String getProperty(PropertyId id)
Gets the property by propertyId.- Overrides:
getPropertyin classSpeechConfig- Parameters:
id- PropertyId of the property.- Returns:
- The value.
-
setServiceProperty
public void setServiceProperty(String name, String value, ServicePropertyChannel channel)
Sets a property value that will be passed to service using the specified channel.- Overrides:
setServicePropertyin classSpeechConfig- Parameters:
name- the property name.value- the property value.channel- the channel used to pass the specified property to service.
-
setLanguage
public void setLanguage(String value)
Sets the language- Parameters:
value- the language identifier in BCP-47 format.
-
getLanguage
public String getLanguage()
Gets the language- Returns:
- Returns the language.
-
close
public void close()
Dispose of associated resources.- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classSpeechConfig
-
getImpl
public SafeHandle getImpl()
Returns the dialog service configuration.- Overrides:
getImplin classSpeechConfig- Returns:
- The implementation of the config.
-
-