Text Independent - Identify Single Speaker
Identifiera entalarprofil
Identifierar vem som talar i indataljud i en lista över kandidatprofiler.
Begränsningar:
Minsta ljudinmatningslängd är 1 sekund
Maximal ljudinmatningslängd är 120 sekunder
Minsta antal kandidattalare är 1
Maximalt antal kandidattalare är 50
Minsta effektiva tallängd (exklusive tystnad och andra icke-talramar) är 4 sekunder Den här begränsningen kan inaktiveras genom att ange "ignoreMinLength" till true.
Minsta ljud signal-till-brus-förhållande (SNR) är 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-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Cognitive Services-slutpunkter som stöds (protokoll och värdnamn, till exempel: https://westus.api.cognitive.microsoft.com). |
api-version
|
query | True |
string |
Anger vilken version av åtgärden som ska användas för den här begäran. |
profile
|
query | True |
string[] |
Kommaavgränsade profil-ID:t. Maximalt antal som stöds är 50 ID:t. |
ignore
|
query |
boolean |
Om det är sant hoppas den minsta mängd tal som krävs för identifiering över. Standardvärdet är false. |
Begärandehuvud
Media Types: "audio/wav; codecs=audio/pcm"
Name | Obligatorisk | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Begärandetext
Media Types: "audio/wav; codecs=audio/pcm"
Name | Typ | Description |
---|---|---|
audioData |
object |
Binär ljudfil. Format som stöds är audio/wav; codecs=audio/pcm. Stöder ljud upp till 5 MB. |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
Fel Headers x-ms-error-code: string |
Säkerhet
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Exempel
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"
}
}
Definitioner
Name | Description |
---|---|
Error | |
Identified |
|
Identify |
Identifierad talarinformation |
Speaker |
Talarfelmeddelande |
Error
Name | Typ | Description |
---|---|---|
code |
string |
|
message |
string |
IdentifiedSingleSpeakerInfo
Name | Typ | Description |
---|---|---|
identifiedProfile |
Objekt som innehåller data för identifierad profil. |
|
profilesRanking |
Objekt som innehåller data från de 5 främsta profilerna (inklusive identifierad profil) sorterade i fallande ordning efter poäng. |
IdentifyInfo
Identifierad talarinformation
Name | Typ | Description |
---|---|---|
profileId |
string |
ID för identifierad profil. Om ingen kandidat identifieras som rätt talare anges värdet till tomt GUID. |
score |
number |
Ett flyttalsnummer som anger likheten mellan indataljud och riktad röstutskrift. Det här talet måste vara mellan 0 och 1. Ett högre tal innebär högre likhet. |
SpeakerErrorInfo
Talarfelmeddelande
Name | Typ | Description |
---|---|---|
error |