Text Independent - Verify Profile
驗證配置檔
根據輸入音訊驗證現有的配置檔。
限制:
- 音訊輸入長度下限為 1秒
- 音訊輸入長度上限為 120秒
- 最小有效語音長度 (排除無聲和其他「非語音」畫面格) 為 4 秒 此限制可藉由將 “ignoreMinLength” 設定為 true 來停用。
- (SNR) 的音訊號與雜訊比率下限為 2dB
POST {endpoint}/speaker-recognition/verification/text-independent/profiles/{profileId}:verify?api-version=2021-09-05
POST {endpoint}/speaker-recognition/verification/text-independent/profiles/{profileId}:verify?api-version=2021-09-05&ignoreMinLength={ignoreMinLength}
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
支援的認知服務端點 (通訊協定和主機名,例如: https://westus.api.cognitive.microsoft.com) 。 |
profile
|
path | True |
string uuid |
配置文件標識碼的唯一標識碼 (guid) 。 |
api-version
|
query | True |
string |
指定用於這個要求的作業版本。 |
ignore
|
query |
boolean |
如果為 true,則不論提供或儲存多少語音,都會立即為此配置檔建立語音列印。 預設值為 false。 |
要求標頭
Media Types: "audio/wav; codecs=audio/pcm"
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
要求本文
Media Types: "audio/wav; codecs=audio/pcm"
名稱 | 類型 | Description |
---|---|---|
audioData |
object |
二進位音訊檔案。 支援的格式為音訊/wav;codecs=audio/pcm。 支援最多 5MB 的音訊。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
|
Other Status Codes |
失敗 Headers x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
範例
Successful Query
Sample Request
POST https://westus.api.cognitive.microsoft.com/speaker-recognition/verification/text-independent/profiles/49a36324-fc4b-4387-aa06-090cfbf0064f:verify?api-version=2021-09-05
"{binary file date}"
Sample Response
Content-Type: application/json
{
"recognitionResult": "accept",
"score": 0.63
}
Content-Type: application/json
x-ms-error-code: Error Code
{
"error": {
"code": "Error Code",
"message": "Erro Messae"
}
}
定義
名稱 | Description |
---|---|
Error | |
Recognition |
說話者辨識結果 |
Result |
音訊是否屬於目標配置檔? |
Speaker |
說話者錯誤訊息 |
Error
名稱 | 類型 | Description |
---|---|---|
code |
string |
|
message |
string |
RecognitionInfo
說話者辨識結果
名稱 | 類型 | Description |
---|---|---|
recognitionResult |
音訊是否屬於目標配置檔? |
|
score |
number |
浮點數,指出輸入音訊與目標語音列印之間的相似度。 此數字必須介於 0 到 1 之間。 較高的數位表示較高的相似度。 |
ResultType
音訊是否屬於目標配置檔?
名稱 | 類型 | Description |
---|---|---|
accept |
string |
|
reject |
string |
SpeakerErrorInfo
說話者錯誤訊息
名稱 | 類型 | Description |
---|---|---|
error |