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

VoiceProfileClient 类

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.speaker.VoiceProfileClient

实现

java.lang.AutoCloseable

public final class VoiceProfileClient
implements java.lang.AutoCloseable

语音配置文件客户端执行说话人识别的语音配置文件管理。 注意:必须调用 close () 才能释放对象持有的基础资源。

构造函数摘要

构造函数 说明
VoiceProfileClient(SpeechConfig speechConfig)

创建语音配置文件客户端的新实例。

方法摘要

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

释放关联的资源。

java.util.concurrent.Future<VoiceProfile> createProfileAsync(VoiceProfileType voiceProfileType, String locale)

创建语音配置文件作为异步操作。

java.util.concurrent.Future<VoiceProfileResult> deleteProfileAsync(VoiceProfile voiceProfile)

异步删除语音配置文件。

java.util.concurrent.Future<VoiceProfileEnrollmentResult> enrollProfileAsync(VoiceProfile voiceProfile, AudioConfig audioConfig)

异步注册语音配置文件。

java.util.concurrent.Future<VoiceProfilePhraseResult> getActivationPhrasesAsync(VoiceProfileType voiceProfileType, String locale)

获取注册的有效激活短语。

java.util.concurrent.Future<java.util.List<VoiceProfile>> getAllProfilesAsync(VoiceProfileType voiceProfileType)

获取所有语音配置文件作为异步操作。

SafeHandle getImpl()

用于获取基础本机句柄的内部方法。

PropertyCollection getProperties()

为语音配置文件客户端定义的属性及其值的集合。

java.util.concurrent.Future<VoiceProfileResult> resetProfileAsync(VoiceProfile voiceProfile)

异步重置语音配置文件。

java.util.concurrent.Future<VoiceProfileEnrollmentResult> retrieveEnrollmentResultAsync(VoiceProfile voiceProfile)

在给定语音配置文件的情况下检索注册结果。

方法继承自 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

构造函数详细信息

VoiceProfileClient

public VoiceProfileClient(SpeechConfig speechConfig)

创建语音配置文件客户端的新实例。

Parameters:

speechConfig - 语音配置。

方法详细信息

close

public void close()

释放关联的资源。 注意:必须调用 close () 才能释放对象持有的基础资源。

createProfileAsync

public Future createProfileAsync(VoiceProfileType voiceProfileType, String locale)

创建语音配置文件作为异步操作。

Parameters:

voiceProfileType - 语音配置文件类型。
locale - 区域设置,例如“en-us”。

Returns:

表示创建语音配置文件的结果的异步操作。

deleteProfileAsync

public Future deleteProfileAsync(VoiceProfile voiceProfile)

异步删除语音配置文件。

Parameters:

voiceProfile - 语音配置文件。

Returns:

表示删除语音配置文件的结果的异步操作。

enrollProfileAsync

public Future enrollProfileAsync(VoiceProfile voiceProfile, AudioConfig audioConfig)

异步注册语音配置文件。

Parameters:

voiceProfile - 语音配置文件。
audioConfig - 音频配置。

Returns:

表示注册语音配置文件结果的异步操作。

getActivationPhrasesAsync

public Future getActivationPhrasesAsync(VoiceProfileType voiceProfileType, String locale)

获取注册的有效激活短语。

Parameters:

voiceProfileType - 语音配置文件类型。
locale - 区域设置,例如“en-us”。

Returns:

表示获取激活短语的结果的异步操作。

getAllProfilesAsync

public Future<>> getAllProfilesAsync(VoiceProfileType voiceProfileType)

获取所有语音配置文件作为异步操作。

Parameters:

voiceProfileType - 语音配置文件类型。

Returns:

表示获取所有语音配置文件的结果的异步操作。

getImpl

public SafeHandle getImpl()

用于获取基础本机句柄的内部方法。

Returns:

基础对象的本机句柄。

getProperties

public PropertyCollection getProperties()

为 VoiceProfileClient 定义的属性及其值的集合。

Returns:

为 VoiceProfileClient 定义的属性及其值的集合。

resetProfileAsync

public Future resetProfileAsync(VoiceProfile voiceProfile)

异步重置语音配置文件。

Parameters:

voiceProfile - 语音配置文件。

Returns:

表示重置语音配置文件结果的异步操作。

retrieveEnrollmentResultAsync

public Future retrieveEnrollmentResultAsync(VoiceProfile voiceProfile)

在给定语音配置文件的情况下检索注册结果。

Parameters:

voiceProfile - 语音配置文件。

Returns:

表示注册语音配置文件结果的异步操作。

适用于