From 678b137a19c2d096c82bef87962dd7df77f2855b Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期三, 09 四月 2025 16:23:25 +0800 Subject: [PATCH] asr open close --- vite.config.ts | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 1c82ca0..5977664 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -58,13 +58,27 @@ host: '0.0.0.0', port: env.VITE_PORT as unknown as number, open: JSON.parse(env.VITE_OPEN), - hmr: false, + hmr: true, proxy: { '/events': { target: 'http://localhost:3000', - changeOrigin: true - } - } + changeOrigin: true, + }, + /** @description 鐧惧害璇煶璇嗗埆 */ + '/api/baidu/speech_recognition': { + target: 'https://aip.baidubce.com/rpc/2.0/tts/v1', + changeOrigin: true, + }, + /** @description 鐧惧害璇煶鍚堟垚 */ + '/api/baidu/speech_synthesis': { + target: 'https://aip.baidubce.com/rpc/2.0/tts/v1', + changeOrigin: true, + rewrite: (path) => { + const newPath = path.replace('/api/baidu/speech_synthesis', ''); + return newPath; + }, + }, + }, }, build: { // outDir: 'dist/' + mode.mode, -- Gitblit v1.9.3