七牛云的音频转码。把微信的speex音频转码为mp3格式
node 代码
执行后。在对象存储里面就可以看到啦。
var qiniu= require('qiniu');
//你的KEY
var accessKey = 'xxxxxxxxxxxxx';
var secretKey = 'yyyyyyyyyyyyy';
var mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
var config = new qiniu.conf.Config();
config.zone = qiniu.zone.Zone_z0; //区域
var bucketManager = new qiniu.rs.BucketManager(mac, config);
var bucket = "xxxx"; //你的对象存储bucket
var key = "gq1KodyOeW5qxD9HyNqaZgX4bPpYz4xoZAHvWlVv-TLfuWRxlO0caoxHem8I_Hf8.speex";//的文件名
bucketManager.stat(bucket, key, function(err:any, respBody:any, respInfo:any) {
if (err) {
console.log(err);
} else {
if (respInfo.statusCode == 200) {
console.log(respBody.hash);
console.log(resp