Skip to content

获取声音定制列表

说明

仅支持查询由声音定制任务接口提交的声音

QPS   10/min

请求地址

http
POST /open/v1/list_customised_audio
http
access_token: {{access_token}}

Content-Type:application/json

请求参数 Body

json
{
  "page": 1,
  "page_size": 2
}

响应

返回示例

json
{
    "trace_id": "",
    "code": 0,
    "msg": "success",
    "data": {
      "list": [
        {
          "id": "C-Audio-793d02b175994ece930001a5589e514c",
          "progress": 100,
          "name": "声音克隆",
          "audio_path": "https://chanjin.cc/chanjing/custom/person/2024-12-26/29e3e5eff93a676eecc2b00530081dab.wav",
          "err_msg": ""
        },
        {
          "id": "C-Audio-7984a80178434b868788a45cfd6abfbb",
          "progress": 0,
          "name": "声音克隆",
          "audio_path": "",
          "err_msg": "任务失败,请重试,或联系客服处理"
        }
      ],
      "page_info": {
        "page": 1,
        "size": 2,
        "total_count": 2,
        "total_page": 1
      }
    }
}

响应字段说明

一级字段二级字段三级字段说明
code响应状态码
msg响应消息
data响应数据
list声音定制列表
id声音 id
progress任务进度 0-100
type声音模型类型(cicada1.0、cicada2.0)
name声音名称
err_msg异常或失败的错误信息
audio_path训练音频片段(从原音频中截取的有效片段用于训练)
status制作状态 1制作中 2已完成 3已过期 4 制作失败 99 已删除
page_info分页信息
page当前页码
size页面大小
total_count声音总数
total_page总页数

响应状态码说明

code说明
0响应成功
400传入参数格式错误
10400AccessToken验证失败
APP状态错误
40000参数错误
40001超出QPS限制
50000系统内部错误
51000系统内部错误

请求示例

bash
curl -L -X POST 'https://www.chanjing.cc/api/open/v1/list_customised_audio' -H 'access_token: NPSMe0G338uGmGEIAWfjfoI+YaGFquongf70BsiOOUifE+icRi3tEae1G2TaH/Db' -H 'Content-Type: application/json' -d '{"page":1,"page_size":5}'
go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "https://www.chanjing.cc/api/open/v1/list_customised_audio"
  method := "POST"

  payload := strings.NewReader(`{"page":1,"page_size":5}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("access_token", "NPSMe0G338uGmGEIAWfjfoI+YaGFquongf70BsiOOUifE+icRi3tEae1G2TaH/Db")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"page\":1,\"page_size\":5}");
Request request = new Request.Builder()
  .url("https://www.chanjing.cc/api/open/v1/list_customised_audio")
  .method("POST", body)
  .addHeader("access_token", "NPSMe0G338uGmGEIAWfjfoI+YaGFquongf70BsiOOUifE+icRi3tEae1G2TaH/Db")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
py
import requests
import json

url = "https://www.chanjing.cc/api/open/v1/list_customised_audio"

payload = json.dumps({
  "page": 1,
  "page_size": 5
})
headers = {
  'access_token': 'NPSMe0G338uGmGEIAWfjfoI+YaGFquongf70BsiOOUifE+icRi3tEae1G2TaH/Db',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)