音频分类
POST/api/v5/audio/classification
对音频文件进行情感分类识别
Request
Query Parameters
model stringrequired
模型名称,默认为 audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim
Header Parameters
Authorization stringrequired
用户个人令牌
- multipart/form-data
Body
filebinaryrequired
音频文件 (支持 mp3, wav)
Responses
- 200
Response Headers
- application/json
- Schema
- Example (auto)
- 1
- 2
Schema
- Array [
- ]
vectornumber
音频文件的向量表示
emotion_class object
arousalnumber
唤醒度分数(情感激活程度:如兴奋/平静)
dominancenumber
支配度分数(情感控制感:如支配/顺从)
valencenumber
效价分数(情感正负向:如愉悦/不悦)
emotionItems object[]
情感分类结果列表(格式化后)
labelstring
分类名称
Example:
激动程度labelEnstring
分类名称(英文)
Example:
Arousalvaluestring
数值
Example:
0.6820112466812134valueDescstring
数值描述
Example:
偏激动valueDescEnstring
数值描述(英文)
Example:
slightly excited{
"vector": 0,
"emotion_class": {
"arousal": 0,
"dominance": 0,
"valence": 0
},
"emotionItems": [
{
"label": "激动程度",
"labelEn": "Arousal",
"value": "0.6820112466812134",
"valueDesc": "偏激动",
"valueDescEn": "slightly excited"
}
]
}
成功示例
{
"vector": null,
"emotion_class": {
"arousal": 0.38037118315696716,
"dominance": 0.4589272439479828,
"valence": 0.5078083276748657
},
"emotion_items": [
{
"label": "激动程度",
"label_en": "Arousal",
"value": "0.38037118315696716",
"value_desc": "偏平静",
"value_desc_en": "Calm"
},
{
"label": "情绪正负",
"label_en": "Valence",
"value": "0.5078083276748657",
"value_desc": "中性",
"value_desc_en": "Neutral"
},
{
"label": "控制感",
"label_en": "Dominance",
"value": "0.4589272439479828",
"value_desc": "中性",
"value_desc_en": "Medium Control"
}
]
}
成功示例
{
"emotionItems": [
{
"label": "",
"labelEn": "",
"value": "",
"valueDesc": "",
"valueDescEn": ""
}
]
}