api手册

请求 URLs:

https://vpc.speakin.mobi

Email: xiachengjia@speakin.mobi License: Mit

voiceprint

query 接口

method: POST

path: /cloudapi/v1beta/voiceprint/query

声纹查询

Body参数例子

{
  "appName": "",
  "unionID": "",
  "timestamp": 123456
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "isRegister": false
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintQueryResponse

register 接口

method: POST

path: /cloudapi/v1beta/voiceprint/register

声纹注册

Body参数例子

{
  "appName": "",
  "replace": false,
  "unionID": "",
  "urls": [
    "123",
    "45",
    "666"
  ],
  "samplingRate": "8k",
  "timestamp": 123456
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": null
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintRegisterResponse

verify 接口

method: POST

path: /cloudapi/v1beta/voiceprint/verify

声纹验证

Body参数例子

{
  "appName": "welab",
  "unionID": "use_one",
  "url": "123456",
  "samplingRate": "",
  "timestamp": 12345
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "score": 0.5
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintVerifyResponse

verify1ton 接口

method: POST

path: /cloudapi/v1beta/voiceprint/verify1ton

声纹验证

Body参数例子

{
  "appName": "welab",
  "unionIDs": [
    "union_id2",
    "union_id2"
  ],
  "url": "123456",
  "samplingRate": "",
  "timestamp": 12345
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "unionID": "123",
    "score": 0.5
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprint1tonVerifyResponse

verifytopn 接口

method: POST

path: /cloudapi/v1beta/voiceprint/verifytopn

声纹验证

Body参数例子

{
  "appName": "test",
  "urls": [],
  "samplingRate": "",
  "topn": 10,
  "timestamp": 12345
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "scores": [
      {
        "unionID": "123",
        "score": 0.5
      }
    ]
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprinttopnVerifyResponse

delete 接口

method: POST

path: /cloudapi/v1beta/voiceprint/delete

声纹查询

Body参数例子

{
  "appName": "",
  "unionID": "",
  "timestamp": 123456
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": null
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintDeleteResponse

threshold 接口

method: POST

path: /cloudapi/v1beta/voiceprint/threshold

查询阈值

Body参数例子

{
  "appName": "",
  "timestamp": 123456
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "threshold": 0.38
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintThresholdResponse

vadcheck 接口

method: POST

path: /cloudapi/v1beta/voiceprint/vadcheck

VAD检测

Body参数例子

{
  "appName": "",
  "url": "",
  "samplingRate": "",
  "duration": 0,
  "timestamp": 123456
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "code": "",
    "status": ""
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintVadcheckResponse

ctcdasr 接口

method: POST

path: /cloudapi/v1beta/voiceprint/ctcdasr

数字asr

Body参数例子

{
  "appName": "",
  "url": "storage/xxxx-xxxx",
  "samplingRate": "",
  "duration": 0,
  "timestamp": 0
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "asrString": "123456"
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintCtcdasrResponse

verify_multi 接口

method: POST

path: /cloudapi/v1beta/voiceprint/verify_multi

声纹验证1对多

Body参数例子

{
  "appName": "welab",
  "unionIDs": [
    "use_one",
    "use_two"
  ],
  "urls": [
    "123456",
    "1234567"
  ],
  "samplingRate": "",
  "timestamp": 12345
}

所有参数

参数 位置 类型 是否必须 描述信息

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "report": [
      {
        "unionID": "use_one",
        "score": 99
      },
      {
        "unionID": "use_two",
        "score": 10
      }
    ]
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 RespVoiceprintVerifyMultiResponse

storage

upload 接口

method: POST

path: /cloudapi/v1beta/storage/upload

上传文件

Body参数例子

string

所有参数

参数 位置 类型 是否必须 描述信息
bucket query string true 桶id
type query string true 文件类型
durationMS query integer(int64) false 时长
timestamp query integer(int64) true 时间戳

响应例子

200 Response

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "key": "123"
  }
}

响应

状态 意味着 Description Schema
200 OK 响应参数 CallUploadResponse

download 接口

method: GET

path: /cloudapi/v1beta/storage/download

下载文件

所有参数

参数 位置 类型 是否必须 描述信息
bucket query string true 桶id
key query string true 文件key

响应例子

200 Response

响应

状态 意味着 Description Schema
200 OK 二进制文件 string

Schemas

CallUploadResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "key": "123"
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data UploadResponse false none none

RespVoiceprint1tonVerifyResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "unionID": "123",
    "score": 0.5
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data Voiceprint1tonVerifyResponse false none none

RespVoiceprintCtcdasrResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "asrString": "123456"
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintCtcdasrResponse false none none

RespVoiceprintDeleteResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": null
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintDeleteResponse false none none

RespVoiceprintQueryResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "isRegister": false
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintQueryResponse false none none

RespVoiceprintRegisterResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": null
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintRegisterResponse false none none

RespVoiceprintThresholdResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "threshold": 0.38
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintThresholdResponse false none none

RespVoiceprintVadcheckResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "code": "",
    "status": ""
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintVadcheckResponse false none none

RespVoiceprintVerifyMultiResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "report": [
      {
        "unionID": "use_one",
        "score": 99
      },
      {
        "unionID": "use_two",
        "score": 10
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintVerifyMultiResponse false none none

RespVoiceprintVerifyResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "score": 0.5
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprintVerifyResponse false none none

RespVoiceprinttopnVerifyResponse

{
  "hasError": false,
  "errorId": "",
  "errorDesc": "",
  "data": {
    "scores": [
      {
        "unionID": "123",
        "score": 0.5
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
hasError boolean false none none
errorId string false none none
errorDesc string false none none
data VoiceprinttopnVerifyResponse false none none

UnionIDScore

{
  "unionID": "123",
  "score": 0.5
}

Properties

Name Type Required Restrictions Description
unionID string false none union ID
score number(double) false none 得分

UploadResponse

{
  "key": "123"
}

Properties

Name Type Required Restrictions Description
key string false none 文件key

Voiceprint1tonVerifyRequest

{
  "appName": "welab",
  "unionIDs": [
    "union_id2",
    "union_id2"
  ],
  "url": "123456",
  "samplingRate": "",
  "timestamp": 12345
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
unionIDs [string] true none union IDs
url string true none 文件url
samplingRate string true none sampling rate
timestamp integer(int64) true none 时间戳

Voiceprint1tonVerifyResponse

{
  "unionID": "123",
  "score": 0.5
}

Properties

Name Type Required Restrictions Description
unionID string false none union ID
score number(double) false none 得分

VoiceprintCtcdasrRequest

{
  "appName": "",
  "url": "storage/xxxx-xxxx",
  "samplingRate": "",
  "duration": 0,
  "timestamp": 0
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
url string true none 文件url
samplingRate string true none 采样率,8k/16k
duration number(double) true none 时长(以秒为单位)
timestamp integer(int64) true none 时间戳(以秒为单位)

VoiceprintCtcdasrResponse

{
  "asrString": "123456"
}

Properties

Name Type Required Restrictions Description
asrString string false none 数字asr

VoiceprintDeleteRequest

{
  "appName": "",
  "unionID": "",
  "timestamp": 123456
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
unionID string true none union ID
timestamp integer(int64) true none 时间戳(以秒为单位)

VoiceprintDeleteResponse

null

Properties

None

VoiceprintQueryRequest

{
  "appName": "",
  "unionID": "",
  "timestamp": 123456
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
unionID string true none union ID
timestamp integer(int64) true none 时间戳(以秒为单位)

VoiceprintQueryResponse

{
  "isRegister": false
}

Properties

Name Type Required Restrictions Description
isRegister boolean false none 是否注册

VoiceprintRegisterRequest

{
  "appName": "",
  "replace": false,
  "unionID": "",
  "urls": [
    "123",
    "45",
    "666"
  ],
  "samplingRate": "8k",
  "timestamp": 123456
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
replace boolean false none 是否替换
unionID string true none union ID
urls [string] false none 文件url数组
samplingRate string true none sampling rate
timestamp integer(int64) true none 时间戳

VoiceprintRegisterResponse

null

Properties

None

VoiceprintThresholdRequest

{
  "appName": "",
  "timestamp": 123456
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
timestamp integer(int64) true none 时间戳(以秒为单位)

VoiceprintThresholdResponse

{
  "threshold": 0.38
}

Properties

Name Type Required Restrictions Description
threshold number(double) false none 阈值

VoiceprintVadcheckRequest

{
  "appName": "",
  "url": "",
  "samplingRate": "",
  "duration": 0,
  "timestamp": 123456
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
url string true none 文件url
samplingRate string true none sampling rate
duration number(double) true none 时长(以秒为单位)
timestamp integer(int64) true none 时间戳(以秒为单位)

VoiceprintVadcheckResponse

{
  "code": "",
  "status": ""
}

Properties

Name Type Required Restrictions Description
code string false none vad check code
status string false none vad check status

VoiceprintVerifyMultiReport

{
  "unionID": "use_one",
  "score": 99
}

Properties

Name Type Required Restrictions Description
unionID string false none 唯一id
score number(double) false none 分数

VoiceprintVerifyMultiRequest

{
  "appName": "welab",
  "unionIDs": [
    "use_one",
    "use_two"
  ],
  "urls": [
    "123456",
    "1234567"
  ],
  "samplingRate": "",
  "timestamp": 12345
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
unionIDs [string] true none 唯一ID
urls [string] true none 文件url
samplingRate string true none sampling rate
timestamp integer(int64) true none 时间戳

VoiceprintVerifyMultiResponse

{
  "report": [
    {
      "unionID": "use_one",
      "score": 99
    },
    {
      "unionID": "use_two",
      "score": 10
    }
  ]
}

Properties

Name Type Required Restrictions Description
report [VoiceprintVerifyMultiReport] false none 结果

VoiceprintVerifyRequest

{
  "appName": "welab",
  "unionID": "use_one",
  "url": "123456",
  "samplingRate": "",
  "timestamp": 12345
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
unionID string true none 唯一ID
url string true none 文件url
samplingRate string true none sampling rate
timestamp integer(int64) true none 时间戳

VoiceprintVerifyResponse

{
  "score": 0.5
}

Properties

Name Type Required Restrictions Description
score number(double) false none 声纹得分

VoiceprinttopnVerifyRequest

{
  "appName": "test",
  "urls": [],
  "samplingRate": "",
  "topn": 10,
  "timestamp": 12345
}

Properties

Name Type Required Restrictions Description
appName string true none 应用名字
urls [string] true none 文件url
samplingRate string true none sampling rate
topn integer(int64) true none top n
timestamp integer(int64) true none 时间戳

VoiceprinttopnVerifyResponse

{
  "scores": [
    {
      "unionID": "123",
      "score": 0.5
    }
  ]
}

Properties

Name Type Required Restrictions Description
scores [UnionIDScore] false none topn排序