你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Text Independent - Create Profile
创建配置文件
创建具有指定区域设置的新演讲者配置文件。
POST {endpoint}/speaker-recognition/verification/text-independent/profiles?api-version=2021-09-05
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
支持的认知服务终结点 (协议和主机名,例如: https://westus.api.cognitive.microsoft.com) 。 |
api-version
|
query | True |
string |
指定用于此请求的操作的版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
locale | True |
string |
由语言代码和国家/地区代码组合组成的语言标识符。 |
响应
名称 | 类型 | 说明 |
---|---|---|
201 Created |
已成功创建说话人配置文件。 返回 GUID 以引用创建的配置文件。 Headers location: string |
|
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?api-version=2021-09-05
{
"locale": "en-us"
}
Sample Response
Content-Type: application/json
{
"profileId": "49a36324-fc4b-4387-aa06-090cfbf0064f",
"locale": "en-US",
"profileStatus": "Active",
"enrollmentStatus": "Enrolling",
"createdDateTime": "2015-04-23T18:25:43.41Z",
"lastUpdatedDateTime": "2015-04-23T18:25:43.41Z",
"enrollmentsCount": 0,
"enrollmentsLengthInSec": 0,
"enrollmentsSpeechLengthInSec": 0,
"remainingEnrollmentsSpeechLengthInSec": 20,
"modelVersion": "2019-12-05"
}
Content-Type: application/json
x-ms-error-code: Error Code
{
"error": {
"code": "Error Code",
"message": "Erro Messae"
}
}
定义
名称 | 说明 |
---|---|
Error | |
Locale |
说话人配置文件区域设置 |
Profile |
表示配置文件的当前状态的状态。 可用值为:
|
Speaker |
扬声器错误消息 |
Ti |
Text-Independent 说话人个人资料信息 |
Training |
表示配置文件的当前状态的状态。 可用值为:
|
Error
名称 | 类型 | 说明 |
---|---|---|
code |
string |
|
message |
string |
LocaleInfo
说话人配置文件区域设置
名称 | 类型 | 说明 |
---|---|---|
locale |
string |
由语言代码和国家/地区代码组合组成的语言标识符。 |
ProfileStatusType
表示配置文件的当前状态的状态。 可用值为:
- 活动:配置文件处于活动状态,如果注册状态为“已注册”,则可以使用配置文件。
- 非活动:配置文件尚未激活,必须提交激活短语。
名称 | 类型 | 说明 |
---|---|---|
Active |
string |
|
Inactive |
string |
SpeakerErrorInfo
扬声器错误消息
名称 | 类型 | 说明 |
---|---|---|
error |
TiProfileInfo
Text-Independent 说话人个人资料信息
名称 | 类型 | 说明 |
---|---|---|
createdDateTime |
string |
配置文件创建日期时间。 |
enrollmentStatus |
表示配置文件的当前状态的状态。 可用值为:
|
|
enrollmentsCount |
integer |
此配置文件接受的注册音频数。 |
enrollmentsLengthInSec |
number |
此配置文件接受的注册音频的总长度(以秒为单位)。 |
enrollmentsSpeechLengthInSec |
number |
纯语音 (,即删除所有配置文件注册的静音和非语音段后) 的音频量(以秒为单位)。 |
lastUpdatedDateTime |
string |
上次更新配置文件的日期时间。 |
locale |
string |
由语言代码和国家/地区代码组合组成的语言标识符。 |
modelVersion |
string |
指定分配给此配置文件的模型的日期。 格式为 yyyy-mm-dd。 如果配置文件没有注册,此值将为空。 |
profileId |
string |
配置文件 ID (guid) 的唯一标识符。 |
profileStatus |
表示配置文件的当前状态的状态。 可用值为:
|
|
remainingEnrollmentsSpeechLengthInSec |
number |
纯语音 (量,即删除静音和非语音段后) 在几秒钟内完成配置文件注册所需的音频量。 |
TrainingStatusType
表示配置文件的当前状态的状态。 可用值为:
- 正在注册:配置文件没有语音打印,也没有准备好进行识别请求。
- 培训:正在创建配置文件的语音打印,目前无法用于识别。
- 已注册:配置文件具有语音打印,并已准备好接受识别请求。
名称 | 类型 | 说明 |
---|---|---|
Enrolled |
string |
|
Enrolling |
string |
|
Training |
string |