你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

HybridSpeechConfig 类

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.HybridSpeechConfig

实现

java.lang.AutoCloseable

public final class HybridSpeechConfig
implements java.lang.AutoCloseable

定义用于语音识别和语音合成的混合 (云和嵌入式) 配置的类。 注意:必须调用 close () 才能释放对象持有的基础资源。

方法摘要

修饰符和类型 方法和描述
final void close()

释放关联的资源。

static final HybridSpeechConfig fromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)

使用指定的云和嵌入式语音配置创建混合语音配置的实例。

SafeHandle getImpl()

返回语音配置实现的内部句柄。

java.lang.String getProperty(PropertyId id)

按属性 ID 获取属性

java.lang.String getProperty(String name)

获取命名属性作为值。

final OutputFormat 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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

方法详细信息

close

public final void close()

释放关联的资源。

fromConfigs

public static final HybridSpeechConfig fromConfigs(SpeechConfig cloudSpeechConfig, EmbeddedSpeechConfig embeddedSpeechConfig)

使用指定的云和嵌入式语音配置创建混合语音配置的实例。

Parameters:

cloudSpeechConfig - 云语音配置。
embeddedSpeechConfig - 嵌入式语音配置。

Returns:

混合语音配置实例。

getImpl

public SafeHandle getImpl()

返回 SpeechConfig 实现的内部句柄。

Returns:

实现句柄。

getProperty

public String getProperty(PropertyId id)

通过 propertyId 获取属性。

Parameters:

id - 属性的 PropertyId。

Returns:

值。

getProperty

public String getProperty(String name)

获取命名属性作为值。

Parameters:

name - 属性的名称。

Returns:

值。

getSpeechRecognitionOutputFormat

public final OutputFormat getSpeechRecognitionOutputFormat()

获取语音识别输出格式。

Returns:

识别输出格式。

getSpeechSynthesisOutputFormat

public final String getSpeechSynthesisOutputFormat()

获取语音合成输出格式。

Returns:

返回合成输出格式。

setProperty

public void setProperty(PropertyId id, String value)

通过 propertyId 设置属性。

Parameters:

id - 属性的 PropertyId。
value - 值。

setProperty

public void setProperty(String name, String value)

将命名属性设置为值。

Parameters:

name - 属性的名称。
value - 值。

setSpeechRecognitionOutputFormat

public final void setSpeechRecognitionOutputFormat(OutputFormat value)

设置语音识别输出格式。

Parameters:

value - 识别输出格式。

setSpeechSynthesisOutputFormat

public final void setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat value)

设置语音合成输出格式。

Parameters:

value - 合成输出格式 ID (例如 Riff16Khz16BitMonoPcm) 。

适用于