VoiceProfileClient class

針對語音配置檔作業的使用者定義 VoiceProfileClient 類別 (,例如 createProfile、deleteProfile)

Extends

建構函式

VoiceProfileClient(SpeechConfig)

VoiceProfileClient 建構函式。

屬性

authorizationToken

取得用來與服務通訊的授權令牌。

internalData
properties

針對這個 VoiceProfileClient 定義的屬性及其值集合。

telemetryEnabled

這個方法會傳回遙測設定的目前狀態。

繼承的屬性

sessionStarted

定義工作階段已啟動事件的事件處理程式。

sessionStopped

定義會話已停止事件的事件處理程式。

speechEndDetected

定義語音停止事件的事件處理程式。

speechStartDetected

定義語音啟動事件的事件處理程式。

方法

close()

清除物件並關閉基礎連線

createProfileAsync(VoiceProfileType, string)

建立說話者辨識語音配置檔

deleteProfileAsync(VoiceProfile)

刪除說話者辨識語音配置檔

enrollProfileAsync(VoiceProfile, AudioConfig)

建立說話者辨識語音配置檔

getActivationPhrasesAsync(VoiceProfileType, string)

取得語音配置檔註冊的有效授權片語

getAllProfilesAsync(VoiceProfileType)

取得帳戶上具有指定語音配置檔類型的所有語音配置檔

resetProfileAsync(VoiceProfile)

拿掉說話者辨識語音配置檔的所有註冊

retrieveEnrollmentResultAsync(VoiceProfile)

取得語音配置檔的目前資訊

繼承的方法

enableTelemetry(boolean)

這個方法會全域啟用或停用遙測。

建構函式詳細資料

VoiceProfileClient(SpeechConfig)

VoiceProfileClient 建構函式。

new VoiceProfileClient(speechConfig: SpeechConfig)

參數

speechConfig
SpeechConfig

這個合成器的初始屬性集 (驗證金鑰、區域、&c)

屬性詳細資料

authorizationToken

取得用來與服務通訊的授權令牌。

string authorizationToken

屬性值

string

授權權杖。

internalData

object internalData

屬性值

object

properties

針對這個 VoiceProfileClient 定義的屬性及其值集合。

PropertyCollection properties

屬性值

針對這個 VoiceProfileClient 定義的屬性及其值集合。

telemetryEnabled

這個方法會傳回遙測設定的目前狀態。

static boolean telemetryEnabled

屬性值

boolean

如果已啟用遙測,則為 true,否則為 false。

繼承的屬性詳細資料

sessionStarted

定義工作階段已啟動事件的事件處理程式。

public sessionStarted: (sender: Recognizer, event: SessionEventArgs) => void

屬性值

(sender: Recognizer, event: SessionEventArgs) => void

繼承自Recognizer.sessionStarted

sessionStopped

定義會話已停止事件的事件處理程式。

public sessionStopped: (sender: Recognizer, event: SessionEventArgs) => void

屬性值

(sender: Recognizer, event: SessionEventArgs) => void

繼承自Recognizer.sessionStopped

speechEndDetected

定義語音停止事件的事件處理程式。

public speechEndDetected: (sender: Recognizer, event: RecognitionEventArgs) => void

屬性值

(sender: Recognizer, event: RecognitionEventArgs) => void

繼承自Recognizer.speechEndDetected

speechStartDetected

定義語音啟動事件的事件處理程式。

public speechStartDetected: (sender: Recognizer, event: RecognitionEventArgs) => void

屬性值

(sender: Recognizer, event: RecognitionEventArgs) => void

繼承自Recognizer.speechStartDetected

方法詳細資料

close()

清除物件並關閉基礎連線

function close(): Promise<void>

傳回

Promise<void>

createProfileAsync(VoiceProfileType, string)

建立說話者辨識語音配置檔

function createProfileAsync(profileType: VoiceProfileType, lang: string): Promise<VoiceProfile>

參數

profileType
VoiceProfileType

要建立的語音配置檔類型

lang

string

語音配置檔的語言字串 (地區設定)

傳回

Promise<VoiceProfile>

  • VoiceProfile 的承諾。

deleteProfileAsync(VoiceProfile)

刪除說話者辨識語音配置檔

function deleteProfileAsync(profile: VoiceProfile): Promise<VoiceProfileResult>

參數

profile
VoiceProfile

要刪除的語音配置檔

傳回

  • VoiceProfileResult 的承諾。

enrollProfileAsync(VoiceProfile, AudioConfig)

建立說話者辨識語音配置檔

function enrollProfileAsync(profile: VoiceProfile, audioConfig: AudioConfig): Promise<VoiceProfileEnrollmentResult>

參數

profile
VoiceProfile

要為其建立註冊的語音配置檔

audioConfig
AudioConfig

要從中建立註冊的來源資訊

傳回

  • VoiceProfileEnrollmentResult 的承諾。

getActivationPhrasesAsync(VoiceProfileType, string)

取得語音配置檔註冊的有效授權片語

function getActivationPhrasesAsync(profileType: VoiceProfileType, lang: string): Promise<VoiceProfilePhraseResult>

參數

profileType
VoiceProfileType

要取得啟用片語的配置檔類型

lang

string

語音配置檔的語言字串 (地區設定)

傳回

getAllProfilesAsync(VoiceProfileType)

取得帳戶上具有指定語音配置檔類型的所有語音配置檔

function getAllProfilesAsync(profileType: VoiceProfileType): Promise<VoiceProfileEnrollmentResult[]>

參數

profileType
VoiceProfileType

配置檔類型 (要列出配置檔的識別/驗證)

傳回

  • VoiceProfileEnrollmentResults 陣列的承諾。

resetProfileAsync(VoiceProfile)

拿掉說話者辨識語音配置檔的所有註冊

function resetProfileAsync(profile: VoiceProfile): Promise<VoiceProfileResult>

參數

profile
VoiceProfile

要重設的語音配置檔

傳回

  • VoiceProfileResult 的承諾。

retrieveEnrollmentResultAsync(VoiceProfile)

取得語音配置檔的目前資訊

function retrieveEnrollmentResultAsync(profile: VoiceProfile): Promise<VoiceProfileEnrollmentResult>

參數

profile
VoiceProfile

要擷取資訊的語音配置檔

傳回

  • VoiceProfileEnrollmentResult 的承諾。

繼承的方法的詳細資料

enableTelemetry(boolean)

這個方法會全域啟用或停用遙測。

static function enableTelemetry(enabled: boolean)

參數

enabled

boolean

遙測集合的全域設定。 如果設定為 true,則會收集遙測資訊,例如麥克風錯誤、辨識錯誤並傳送給 Microsoft。 如果設定為 false,則不會將任何遙測傳送至 Microsoft。

繼承自Recognizer.enableTelemetry