识别歌曲
将输入的歌曲转换为带时间戳信息的歌词。
接口信息
- 方法: POST
- 路径:
/api/v1/music?action=song_recognize - 功能: 识别歌曲
认证
BearerAuth Type: HTTP (bearer)
请求体
json
{
"upload_audio_id": "string"
}参数说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| upload_audio_id | string | 是 | 要识别的歌曲上传 id,由 files/upload API 生成(purpose: audio) |
响应
json
{
"code": 0,
"message": "success",
"resp_data": {
"duration": 240000,
"lyrics_sections": [
{
"section_type": "verse",
"start": 0,
"end": 30000,
"lines": [
{
"start": 0,
"end": 15000,
"text": "青春如花绽放",
"words": [
{
"start": 0,
"end": 5000,
"text": "青春"
},
{
"start": 5000,
"end": 10000,
"text": "如花"
},
{
"start": 10000,
"end": 15000,
"text": "绽放"
}
]
}
]
}
]
}
}请求示例
bash
curl -X POST "[HOST]/api/v1/music?action=song_recognize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"upload_audio_id": "file_1234567890abcdef"
}'