EmbeddedSpeechConfig Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. EmbeddedSpeechConfig
- com.
Implements
public final class EmbeddedSpeechConfig
implements java.lang.AutoCloseable
Class that defines embedded (offline) speech configuration. Note: close() must be called in order to release underlying resources held by the object.
Method Summary
Modifier and Type | Method and Description |
---|---|
final void |
close()
Dispose of associated resources. |
static final
Embedded |
fromPath(String path)
Creates an instance of the embedded speech config with a specified offline model path. |
static final
Embedded |
fromPaths(List<String> paths)
Creates an instance of the embedded speech config with specified offline model paths. |
Safe |
getImpl()
Returns a internal handle to Speech |
final java.lang.String |
getKeywordRecognitionModelName()
Gets the model name for keyword recognition. |
java.lang.String |
getProperty(PropertyId id)
Gets the property by property |
java.lang.String |
getProperty(String name)
Gets a named property as value. |
final java.lang.String |
getSpeechRecognitionModelName()
Gets the model name for speech recognition. |
final
java.util.List<Speech |
getSpeechRecognitionModels()
Gets a list of available speech recognition models. |
final
Output |
getSpeechRecognitionOutputFormat()
Gets the embedded speech recognition output format. |
final java.lang.String |
getSpeechSynthesisOutputFormat()
Gets the embedded speech synthesis output format. |
final java.lang.String |
getSpeechSynthesisVoiceName()
Gets the voice name for embedded speech synthesis. |
final java.lang.String |
getSpeechTranslationModelName()
Gets the model name for speech translation. |
final
java.util.List<Speech |
getSpeechTranslationModels()
Gets a list of available speech translation models. |
final void |
setKeywordRecognitionModel(String name, String key)
Sets the model for keyword recognition. |
final void |
setProfanity(ProfanityOption value)
Sets the profanity option. |
void |
setProperty(PropertyId id, String value)
Sets the property by property |
void |
setProperty(String name, String value)
Sets a named property as value. |
final void |
setSpeechRecognitionModel(String name, String key)
Sets the model for speech recognition. |
final void |
setSpeechRecognitionOutputFormat(OutputFormat value)
Sets the speech recognition output format. |
final void |
setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)
Sets the embedded speech synthesis output format. |
final void |
setSpeechSynthesisVoice(String name, String key)
Sets the voice for speech synthesis. |
final void |
setSpeechTranslationModel(String name, String key)
Sets the model for speech translation. |
Methods inherited from java.lang.Object
Method Details
close
public final void close()
Dispose of associated resources.
fromPath
public static final EmbeddedSpeechConfig fromPath(String path)
Creates an instance of the embedded speech config with a specified offline model path.
Parameters:
Returns:
fromPaths
public static final EmbeddedSpeechConfig fromPaths(List
Creates an instance of the embedded speech config with specified offline model paths.
Parameters:
Returns:
getImpl
public SafeHandle getImpl()
Returns a internal handle to SpeechConfig implementation.
Returns:
getKeywordRecognitionModelName
public final String getKeywordRecognitionModelName()
Gets the model name for keyword recognition.
Returns:
getProperty
public String getProperty(PropertyId id)
Gets the property by propertyId.
Parameters:
Returns:
getProperty
public String getProperty(String name)
Gets a named property as value.
Parameters:
Returns:
getSpeechRecognitionModelName
public final String getSpeechRecognitionModelName()
Gets the model name for speech recognition.
Returns:
getSpeechRecognitionModels
public final List
Gets a list of available speech recognition models.
Returns:
getSpeechRecognitionOutputFormat
public final OutputFormat getSpeechRecognitionOutputFormat()
Gets the embedded speech recognition output format.
Returns:
getSpeechSynthesisOutputFormat
public final String getSpeechSynthesisOutputFormat()
Gets the embedded speech synthesis output format.
Returns:
getSpeechSynthesisVoiceName
public final String getSpeechSynthesisVoiceName()
Gets the voice name for embedded speech synthesis.
Returns:
getSpeechTranslationModelName
public final String getSpeechTranslationModelName()
Gets the model name for speech translation.
Returns:
getSpeechTranslationModels
public final List
Gets a list of available speech translation models.
Returns:
setKeywordRecognitionModel
public final void setKeywordRecognitionModel(String name, String key)
Sets the model for keyword recognition. This is for customer specific models that are tailored for detecting wake words and direct commands.
Parameters:
setProfanity
public final void setProfanity(ProfanityOption value)
Sets the profanity option. This can be used to remove profane words or mask them in output.
Parameters:
setProperty
public void setProperty(PropertyId id, String value)
Sets the property by propertyId.
Parameters:
setProperty
public void setProperty(String name, String value)
Sets a named property as value.
Parameters:
setSpeechRecognitionModel
public final void setSpeechRecognitionModel(String name, String key)
Sets the model for speech recognition.
Parameters:
setSpeechRecognitionOutputFormat
public final void setSpeechRecognitionOutputFormat(OutputFormat value)
Sets the speech recognition output format.
Parameters:
setSpeechSynthesisOutputFormat
public final void setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)
Sets the embedded speech synthesis output format.
Parameters:
setSpeechSynthesisVoice
public final void setSpeechSynthesisVoice(String name, String key)
Sets the voice for speech synthesis.
Parameters:
setSpeechTranslationModel
public final void setSpeechTranslationModel(String name, String key)
Sets the model for speech translation.
Parameters:
Applies to
Azure SDK for Java