|
@ -22,6 +22,7 @@ export default class Audio { |
|
|
method: "GET", |
|
|
method: "GET", |
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
// url: `http://192.168.124.118:8083/xcx/framework/agent/${this._options.agentId}`,
|
|
|
// url: `http://192.168.124.118:8083/xcx/framework/agent/${this._options.agentId}`,
|
|
|
|
|
|
// url: `https://des.js-dyyj.com/getDemoToken?id=${this._options.agentId}`,
|
|
|
url: `https://des.dayunyuanjian.cn/getDemoToken?id=${this._options.agentId}`, |
|
|
url: `https://des.dayunyuanjian.cn/getDemoToken?id=${this._options.agentId}`, |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
console.log("请求token成功", res); |
|
|
console.log("请求token成功", res); |
|
@ -44,7 +45,8 @@ export default class Audio { |
|
|
async createSocket(options) { |
|
|
async createSocket(options) { |
|
|
console.log("开始创建socket", options); |
|
|
console.log("开始创建socket", options); |
|
|
return new Promise(async (resolve, reject) => { |
|
|
return new Promise(async (resolve, reject) => { |
|
|
const origin = "wss://des.js-dyyj.com/xcx/tts-websocket"; |
|
|
// const origin = "wss://des.js-dyyj.com/xcx/tts-websocket";
|
|
|
|
|
|
const origin = "wss://des.dayunyuanjian.cn/xcx/tts-websocket"; |
|
|
// 建立连接
|
|
|
// 建立连接
|
|
|
const socket = wx.connectSocket({ |
|
|
const socket = wx.connectSocket({ |
|
|
url: `${origin}`, |
|
|
url: `${origin}`, |
|
|