你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
HybridSpeechConfig 类
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. HybridSpeechConfig
- com.
实现
public final class HybridSpeechConfig
implements java.lang.AutoCloseable
定义用于语音识别和语音合成的混合 (云和嵌入式) 配置的类。 注意:必须调用 close () 才能释放对象持有的基础资源。
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
final void |
close()
释放关联的资源。 |
static final
Hybrid |
fromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)
使用指定的云和嵌入式语音配置创建混合语音配置的实例。 |
Safe |
getImpl()
返回语音 |
java.lang.String |
getProperty(PropertyId id)
按属性 ID 获取属性 |
java.lang.String |
getProperty(String name)
获取命名属性作为值。 |
final
Output |
getSpeechRecognitionOutputFormat()
获取语音识别输出格式。 |
final java.lang.String |
getSpeechSynthesisOutputFormat()
获取语音合成输出格式。 |
void |
setProperty(PropertyId id, String value)
按属性 ID 设置属性 |
void |
setProperty(String name, String value)
将命名属性设置为值。 |
final void |
setSpeechRecognitionOutputFormat(OutputFormat value)
设置语音识别输出格式。 |
final void |
setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)
设置语音合成输出格式。 |
方法继承自 java.lang.Object
方法详细信息
close
public final void close()
释放关联的资源。
fromConfigs
public static final HybridSpeechConfig fromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)
使用指定的云和嵌入式语音配置创建混合语音配置的实例。
参数:
返回:
getImpl
public SafeHandle getImpl()
返回 SpeechConfig 实现的内部句柄。
返回:
getProperty
public String getProperty(PropertyId id)
通过 propertyId 获取属性。
参数:
返回:
getProperty
public String getProperty(String name)
获取命名属性作为值。
参数:
返回:
getSpeechRecognitionOutputFormat
public final OutputFormat getSpeechRecognitionOutputFormat()
获取语音识别输出格式。
返回:
getSpeechSynthesisOutputFormat
public final String getSpeechSynthesisOutputFormat()
获取语音合成输出格式。
返回:
setProperty
public void setProperty(PropertyId id, String value)
通过 propertyId 设置属性。
参数:
setProperty
public void setProperty(String name, String value)
将命名属性设置为值。
参数:
setSpeechRecognitionOutputFormat
public final void setSpeechRecognitionOutputFormat(OutputFormat value)
设置语音识别输出格式。
参数:
setSpeechSynthesisOutputFormat
public final void setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)
设置语音合成输出格式。
参数: