diff --git a/assistant/src/routes/shop-install/index.ts b/assistant/src/routes/shop-install/index.ts index 8609c32..07da84d 100644 --- a/assistant/src/routes/shop-install/index.ts +++ b/assistant/src/routes/shop-install/index.ts @@ -47,7 +47,7 @@ app } }) .define(async (ctx) => { - // https://localhost:51015/client/router?path=shop&key=install + // https://localhost:51515/client/router?path=shop&key=install const options = ctx.query?.data || {}; const { id, type, force, yes } = options; assistantConfig.checkMounted(); @@ -74,7 +74,7 @@ app } }) .define(async (ctx) => { - // https://localhost:51015/client/router?path=shop&key=uninstall + // https://localhost:51515/client/router?path=shop&key=uninstall const options = ctx.query?.data || {}; const { id, type, yes } = options; const app = new AppDownload(assistantConfig); diff --git a/assistant/src/services/asr/qwen-asr.ts b/assistant/src/services/asr/qwen-asr.ts index 57c4984..1408793 100644 --- a/assistant/src/services/asr/qwen-asr.ts +++ b/assistant/src/services/asr/qwen-asr.ts @@ -93,20 +93,18 @@ const func: WebSocketListenerFun = async (req: WebSocketReq<{ asr: QwenAsrRelati console.log('ASR receive data', 'blank voice'); } else if (data?.voice) { if (!data?.isRelatime) { - console.log('ASR receive data', 'has voice', !!data?.voice); - } - const isBrowserFormat = data.format === 'float32'; - const time = data?.time || 0; - if (time) { + console.log('ASR receive data', 'has voice', !!data?.voice, data?.isRelatime); + const time = data?.time || 0; console.log('receiveDelay', Date.now() - time); } + const isBrowserFormat = data.format === 'float32'; + let voice: Buffer; if (isBrowserFormat) { voice = await asr.fixBrowerBuffer(data.voice); } else { voice = Buffer.from(data.voice, 'base64'); } - console.log('sendTime', Date.now()); ws.data.startTime = Date.now(); asr.sendBuffer(voice); } diff --git a/assistant/src/test/ws-app.ts b/assistant/src/test/ws-app.ts index 8473336..e271a16 100644 --- a/assistant/src/test/ws-app.ts +++ b/assistant/src/test/ws-app.ts @@ -8,8 +8,8 @@ const testRouter = () => { // const ws = new WebSocket('ws://118.196.32.29:3005/api/router'); // const ws = new WebSocket('wss://kevisual.cn/api/router'); - // const ws = new WebSocket('ws://localhost:51015/api/ws/demo?id=12345'); - const ws = new WebSocket('ws://localhost:51015/api/router?id=12345'); + // const ws = new WebSocket('ws://localhost:51515/api/ws/demo?id=12345'); + const ws = new WebSocket('ws://localhost:51515/api/router?id=12345'); console.log('Connecting to WebSocket server...'); ws.on('open', () => { console.log('WebSocket connection opened'); diff --git a/cli-center/astro.config.mjs b/cli-center/astro.config.mjs index 2cffc53..887cde6 100644 --- a/cli-center/astro.config.mjs +++ b/cli-center/astro.config.mjs @@ -10,7 +10,7 @@ import dotenv from 'dotenv'; dotenv.config(); const isDev = process.env.NODE_ENV === 'development'; -let target = process.env.VITE_API_URL || 'http://localhost:51015'; +let target = process.env.VITE_API_URL || 'http://localhost:51515'; const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' }; let proxy = { '/root/': apiProxy,