Text Independent - Identify Single Speaker
識別單一說話者配置檔
識別在候選配置檔清單中在輸入音訊中說話的人員。
限制:
音訊輸入長度下限為 1秒
音訊輸入長度上限為 120秒
候選演講者計數下限為 1
候選說話者計數上限為 50
最小有效語音長度 (排除無聲和其他非語音畫面) 為 4 秒 此限制可藉由將 “ignoreMinLength” 設定為 true 來停用。
(SNR) 的音訊號與雜訊比率下限為 2dB
POST {endpoint}/speaker-recognition/identification/text-independent/profiles:identifySingleSpeaker?api-version=2021-09-05&profileIds={profileIds}
POST {endpoint}/speaker-recognition/identification/text-independent/profiles:identifySingleSpeaker?api-version=2021-09-05&profileIds={profileIds}&ignoreMinLength={ignoreMinLength}
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
支援的認知服務端點 (通訊協定和主機名,例如: https://westus.api.cognitive.microsoft.com) 。 |
api-version
|
query | True |
string |
指定用於這個要求的作業版本。 |
profile
|
query | True |
string[] |
以逗號分隔的配置檔標識碼。 支持的數目上限為50個標識碼。 |
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/identification/text-independent/profiles:identifySingleSpeaker?api-version=2021-09-05&profileIds=3669fa29-1bf3-45ad-beea-6b348d058d7e,111f427c-3791-468f-b709-fcef7660fff9,0e196cd9-32d5-4883-8631-54a0e7c7cb3d,0e196cd9-32d5-4883-8631-54a0e7c7cb3d,726e57d9-04e0-4214-b482-7f786fa83560,f95189fd-1bf5-4485-9c2e-e5897e0c98ca
"{binary file date}"
Sample Response
Content-Type: application/json
{
"identifiedProfile": {
"profileId": "111f427c-3791-468f-b709-fcef7660fff9",
"score": 0.63
},
"profilesRanking": [
{
"profileId": "111f427c-3791-468f-b709-fcef7660fff9",
"score": 0.63
},
{
"profileId": "3669fa29-1bf3-45ad-beea-6b348d058d7e",
"score": 0.49
},
{
"profileId": "0e196cd9-32d5-4883-8631-54a0e7c7cb3d",
"score": 0.4
},
{
"profileId": "726e57d9-04e0-4214-b482-7f786fa83560",
"score": 0.1
},
{
"profileId": "f95189fd-1bf5-4485-9c2e-e5897e0c98ca",
"score": 0.03
}
]
}
Content-Type: application/json
x-ms-error-code: Error Code
{
"error": {
"code": "Error Code",
"message": "Erro Messae"
}
}
定義
名稱 | Description |
---|---|
Error | |
Identified |
|
Identify |
識別的說話者資訊 |
Speaker |
說話者錯誤訊息 |
Error
名稱 | 類型 | Description |
---|---|---|
code |
string |
|
message |
string |
IdentifiedSingleSpeakerInfo
名稱 | 類型 | Description |
---|---|---|
identifiedProfile |
物件,其中包含已識別配置檔的數據。 |
|
profilesRanking |
物件,其中包含前 5 個設定檔的數據, (包括已識別的配置檔) 依分數排序的遞減順序。 |
IdentifyInfo
識別的說話者資訊
名稱 | 類型 | Description |
---|---|---|
profileId |
string |
已識別配置文件的識別碼。 如果未將候選項目識別為正確的說話者,此值會設定為空的 GUID。 |
score |
number |
浮點數,指出輸入音訊與目標語音列印之間的相似度。 此數字必須介於 0 到 1 之間。 較高的數位表示較高的相似度。 |
SpeakerErrorInfo
說話者錯誤訊息
名稱 | 類型 | Description |
---|---|---|
error |