同问,,,有答案qq:25138414 ,有红包
exception onOpen fail code:8,TLS handshake failed?[图片] 调用 wx.connectSocket返回success.马上返回exception onOpen fail code:8,TLS handshake failed? 测试环境如下: 1:PC端测试 一切正常 2:android 9.0 小米6测试 报上面的错误。 谁能帮忙解答一下。 检查网站已经只支持TLS 1.2.禁用了TLS1.1和TLS1.0 请教下小程序WebSocket能够使用端口吗? wss://xxx.xxx.com:8080?这种是否能够接受,还是只能使用域名
2020-10-28我也有同样问题,您后来解决了吗?
websocket api wx.onsocketmessage接收不到消息?调用搜狗AI开放平台的asr语音识别接口。二进制音频数据已经发送成功,但是接受不到服务器消息。 [图片] const recorder=wx.getRecorderManager() const recordconfig={ frameSize: 25, sampleRate: 16000, format: 'WAV', numberOfChannels: 1 } const app=getApp() openSocket: function(){ wx.connectSocket({ url: 'wss://api.zhiyin.sogou.com/wss/asr/v1/streaming_recognize?Appid=1WCCVjJBLB5GzcRIEepsbmxNdgd&Authorization=Bearer '+wx.getStorageSync('token'), timeout: 600000, success: res=>{ console.log("连接成功") } }) wx.onSocketMessage(res => { console.log(res) }) wx.onSocketOpen((result) => { console.log(result) let config={ "encoding": "LINEAR16", "sample_rate_hertz": 16000, "language_code": "zh-cmn-Hans-CN" } let streamconfig={ "config": config, "interim_results": true } wx.sendSocketMessage({ data: JSON.stringify(streamconfig), success: res=>{ console.log('发送初始帧') } }) recorder.start(recordconfig) recorder.onFrameRecorded(res=>{ wx.sendSocketMessage({ data: wx.arrayBufferToBase64(res.frameBuffer), success: res=>{ console.log('发送数据帧') } }) }) }) }
2020-10-25