Class HybridSpeechConfig
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.HybridSpeechConfig
-
- All Implemented Interfaces:
AutoCloseable
public final class HybridSpeechConfig extends Object implements AutoCloseable
Class that defines hybrid (cloud and embedded) configurations for speech recognition and speech synthesis. Note: close() must be called in order to release underlying resources held by the object.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Dispose of associated resources.static HybridSpeechConfigfromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)Creates an instance of the hybrid speech config with specified cloud and embedded speech configs.SafeHandlegetImpl()Returns a internal handle to SpeechConfig implementation.StringgetProperty(PropertyId id)Gets the property by propertyId.StringgetProperty(String name)Gets a named property as value.OutputFormatgetSpeechRecognitionOutputFormat()Gets the speech recognition output format.StringgetSpeechSynthesisOutputFormat()Gets the speech synthesis output format.voidsetProperty(PropertyId id, String value)Sets the property by propertyId.voidsetProperty(String name, String value)Sets a named property as value.voidsetSpeechRecognitionOutputFormat(OutputFormat value)Sets the speech recognition output format.voidsetSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)Sets the speech synthesis output format.
-
-
-
Method Detail
-
fromConfigs
public static final HybridSpeechConfig fromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)
Creates an instance of the hybrid speech config with specified cloud and embedded speech configs.- Parameters:
cloudSpeechConfig- Cloud speech configuration.embeddedSpeechConfig- Embedded speech configuration.- Returns:
- A hybrid speech config instance.
-
setSpeechRecognitionOutputFormat
public final void setSpeechRecognitionOutputFormat(OutputFormat value)
Sets the speech recognition output format.- Parameters:
value- The recognition output format.
-
getSpeechRecognitionOutputFormat
public final OutputFormat getSpeechRecognitionOutputFormat()
Gets the speech recognition output format.- Returns:
- The recognition output format.
-
setSpeechSynthesisOutputFormat
public final void setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)
Sets the speech synthesis output format.- Parameters:
value- The synthesis output format ID (e.g. Riff16Khz16BitMonoPcm).
-
getSpeechSynthesisOutputFormat
public final String getSpeechSynthesisOutputFormat()
Gets the speech synthesis output format.- Returns:
- Returns the synthesis output format.
-
setProperty
public void setProperty(String name, String value)
Sets a named property as value.- Parameters:
name- the name of the property.value- the value.
-
setProperty
public void setProperty(PropertyId id, String value)
Sets the property by propertyId.- Parameters:
id- PropertyId of the property.value- The value.
-
getProperty
public String getProperty(String name)
Gets a named property as value.- Parameters:
name- the name of the property.- Returns:
- The value.
-
getProperty
public String getProperty(PropertyId id)
Gets the property by propertyId.- Parameters:
id- PropertyId of the property.- Returns:
- The value.
-
close
public final void close()
Dispose of associated resources.- Specified by:
closein interfaceAutoCloseable
-
getImpl
public SafeHandle getImpl()
Returns a internal handle to SpeechConfig implementation.- Returns:
- The implementation handle.
-
-