百度的语音合成返回的MP3语音data怎么播放呢?
wx.request({
url: "https://tsn.baidu.com/text2audio?tex=more&lan=zh&cuid=wh123wh&ctp=1&tok=24***82300",
data: { aue: 3 },
success(res) {
fs.writeFile({
filePath: `${wx.env.USER_DATA_PATH}/lady.mp3`,
data: res.data,
encoding: 'ucs2',
success(ws) {
innerAudioContext.src = `${wx.env.USER_DATA_PATH}/lady.mp3`
innerAudioContext.play()
},
})
},
})
将返回的MP3数据,写入一个临时文件,但是返回的错误提示为Uncaught (in promise) DOMException: Failed to load because no supported source was found.

给个mp3文件 不要马赛克
wx.request百度返回:
cookies: []
data: "��(�P~�T �Hx�����"
errMsg: "request:ok"
header:
Access-Control-Allow-Methods: "GET, POST, OPTIONS"
Access-Control-Allow-Origin: "*"
Cache-Control: "max-age=36000"
Content-Length: "1224"
Content-Type: "audio/mp3"
Date: "Wed, 28 Jun 2023 02:05:48 GMT"
P3p: "CP=" OTI DSP COR IVA OUR IND COM ""
Server: "nginx/1.8.0"
wx.request({url: "https://tsn.baidu.com/text2audio?tex=more&lan=zh&cuid=wh123wh&ctp=1&tok=24.***00",data: {},success(res) {let encoding = 'utf8'let cloudPath = "artiNewWord/" + encoding + ".mp3"let filePath = `${wx.env.USER_DATA_PATH}/lady.mp3`fs.writeFile({filePath,data: res.data,encoding,success(ws) {wx.cloud.uploadFile({cloudPath,filePath,success: sult => {}})}})},})wx.request({url: "https://tsn.baidu.com/text2audio?tex=more&lan=zh&cuid=wh123wh&ctp=1&tok=24.13982dcca8906c2f0e42f52d22a47c75.2592000.1689903036.282335-35101300",data: {aue: 3},success(res) {console.log('1 typeof (res.data): ', typeof (res.data), res.data.length)console.log('2 su', res)let encoding = 'utf8'let cloudPath = "artiNewWord/" + encoding + ".mp3"let filePath = `${wx.env.USER_DATA_PATH}/lady.mp3`fs.writeFile({filePath,data: res.data,encoding,success(ws) {console.log('fwrite', ws)console.log('fwrite ${wx.env.USER_DATA_PATH}/lady.mp3', `${wx.env.USER_DATA_PATH}/lady.mp3`)wx.cloud.uploadFile({cloudPath,filePath,success: sult => {},fail: we => {console.log('fail te upload', we)}}))// innerAudioContext.src = `${wx.env.USER_DATA_PATH}/lady.mp3`// innerAudioContext.play()},})}})