fengjiajun169

Results 5 comments of fengjiajun169

我在本地部署也这样,VITE_ENABLE_SPEECH='false'聊天界面正常,改成VITE_ENABLE_SPEECH='true'输入框没了,语音的按钮也没有,我是通过npm start && npm run preview本地测试的

> 我在本地部署也这样,VITE_ENABLE_SPEECH='false'聊天界面正常,改成VITE_ENABLE_SPEECH='true'输入框没了,语音的按钮也没有,我是通过npm start && npm run preview本地测试的 第一张图是VITE_ENABLE_SPEECH='true'的,第二张图是VITE_ENABLE_SPEECH='false'的 ![1](https://user-images.githubusercontent.com/9251740/229981809-a0ac3c91-bd98-43af-afe4-bfa4ede4c06d.png) ![2](https://user-images.githubusercontent.com/9251740/229981813-d6be6578-85b0-4ab8-a1bc-58091bba4b25.png)

> > 我在本地部署也这样,VITE_ENABLE_SPEECH='false'聊天界面正常,改成VITE_ENABLE_SPEECH='true'输入框没了,语音的按钮也没有,我是通过npm start && npm run preview本地测试的 > > 第一张图是VITE_ENABLE_SPEECH='true'的,第二张图是VITE_ENABLE_SPEECH='false'的 ![1](https://user-images.githubusercontent.com/9251740/229981809-a0ac3c91-bd98-43af-afe4-bfa4ede4c06d.png) ![2](https://user-images.githubusercontent.com/9251740/229981813-d6be6578-85b0-4ab8-a1bc-58091bba4b25.png) ![image](https://user-images.githubusercontent.com/9251740/230020294-72f17218-b699-47d9-9ec4-9e4fa878894c.png) 加载的时候报了TypeError: Cannot read properties of undefined (reading 'speechSetting'),不知道是不是这个原因

> @fengjiajun169 VITE_ENABLE_SPEECH=true, 是不是 true 加了单引号,所以有问题? 应该不是,如果不加单引号这个配置不生效,而且我在代码里写死也一样

> @fengjiajun169 我看了下这个错误,是在使用 web speech api 时不同系统的 chrome 获取的语音包不同造成的,修改了一下异常的部分。(抱歉,我一直用的 微软语音,没注意到这个问题) > > 然后 `VITE_ENABLE_SPEECH=true` 是不需要加引号的。 > > 现在可以了,感谢!