语音文件同步接口

请求地址:

  • 国内: http://api.speech.tuputech.com/v3/recognition/speech/<secretId>
  • 国外: http://api-us.open.tuputech.com/v3/recognition/speech/<secretId>

secretId 需替换为您的 secretId,请联系我们为您开通 secretId。

请求方法:

POST

请求头:

Content-Type: multipart/form-data

请求及返回参数

请求参数说明:

参数名 类型 是否必填 说明
speech String或File 支持传语音文件或者URl,不过两者不能混在同一请求中;大小限制: 10M 以内;允许识别的格式:amr, mp3, wmv, wav, flv, m4a
task String 指定本次调用要审核的任务,任务id的形式,如:5caee6b2a76925c55a09a6d2
language String 需要识别的语言代码。需要进行多语种语音转译审核或者多语种转译时必传。多语种语音转译类产品需联系图普进行配置使用。
对应语言代码详见:语音转译审核(多语种)
timestamp Number 当前的服务器的Unix时间戳
nonce Number 随机数
signature String 我们采用的数字证书签名算法是:"RSA-SHA256",签名输出类型是:"base64",具体步骤如下:
1、所有参与签名的参数为:secretId,timestamp,nonce,用英文半角逗号“,”相连,得到sign_string;
2、利用您的私钥,使用算法"RSA-SHA256"签名,输出为 "base64" 格式,得到参数signature的值。
点击管理公钥证书查看如何生成私钥,及如何上传您的公钥用于数字签名的认证;

QPS限制

  • 1 秒最多允许请求 50 次;
  • 1 个请求最多携带 10 个文件;

如有特殊并发需求,请联系我们。

返回参数说明

curl请求示例

curl -X POST --header 'Content-Type: multipart/form-data' \
-F 'speech=@your_speech_file_path_or_url' \
-F 'timestamp=1553249299' \
-F 'nonce=0.04708760756305974' \
-F 'signature=your_signature' \
'http://api.speech.tuputech.com/v3/recognition/speech/your_secret_id'

指定任务的curl请求示例

curl -X POST --header 'Content-Type: multipart/form-data' \
-F 'speech=@your_speech_file_path_or_url' \
-F 'task=task_id' \
-F 'timestamp=1553249299' \
-F 'nonce=0.04708760756305974' \
-F 'signature=your_signature' \
'http://api.speech.tuputech.com/v3/recognition/speech/your_secret_id'

results matching ""

    No results matching ""