QQ::weixin::work::media::get
获取高清语音素材 最后更新:2017/11/30
https://developer.work.weixin.qq.com/document/path/90255
可以使用本接口获取从JSSDK的uploadVoice接口上传的临时语音素材,格式为speex,16K采样率。该音频比上文的临时素材获取接口(格式为amr,8K采样率)更加清晰,适合用作语音识别等对音质要求较高的业务。
参数 必须 说明 access_token 是 调用接口凭证 media_id 是 媒体文件id,见上传临时素材,以及异步上传临时素材(超过20M需使用Range分块下载,且分块大小不超过20M,否则返回错误码830002)
仅企业微信2.4及以上版本支持。 完全公开,media_id在同一企业内所有应用之间可以共享。
正确时返回(和普通的http下载相同,请根据http头做相应的处理):
HTTP/1.1 200 OK Connection: close Content-Type: voice/speex Content-disposition: attachment; filename="XXX" Date: Sun, 06 Jan 2013 10:20:18 GMT Cache-Control: no-cache, must-revalidate Content-Length: 339721 Xxxx
错误时返回(这里省略了HTTP首部):
{ "errcode": 40007, "errmsg": "invalid media_id" }
参数 说明 errcode 出错返回码 errmsg 对返回码的文本描述内容
To install QQ::weixin::work, copy and paste the appropriate command in to your terminal.
cpanm
cpanm QQ::weixin::work
CPAN shell
perl -MCPAN -e shell install QQ::weixin::work
For more information on module installation, please visit the detailed CPAN module installation guide.