Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 使用browser作为语音识别服务时出现白屏 #1660

Closed
cy948 opened this issue Mar 20, 2024 · 5 comments
Closed

[Bug] 使用browser作为语音识别服务时出现白屏 #1660

cy948 opened this issue Mar 20, 2024 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@cy948
Copy link
Contributor

cy948 commented Mar 20, 2024

💻 系统环境

Windows

📦 部署环境

Official Preview

🌐 浏览器

Edge

🐛 问题描述

使用browser作为语音识别服务时出现白屏
image

🚦 期望结果

不白屏

📷 复现步骤

  • 进入/settings/tts
  • 语音识别服务选择 Browser
  • 通过左侧导航栏图标返回 /chat 再刷新页面,或通过地址栏直接进入 /chat

📝 补充信息

image

@cy948 cy948 added the 🐛 Bug Something isn't working | 缺陷 label Mar 20, 2024
@lobehubbot
Copy link
Member

👀 @cy948

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@arvinxx
Copy link
Contributor

arvinxx commented Mar 20, 2024

相关问题:

主要原因是 @canisminor1990 之前实现不规范导致的:

switch (ttsSettings.sttServer) {
case 'openai': {
useSelectedSTT = useOpenAISTT;
options = {
api: {
headers: createHeaderWithOpenAI(),
serviceUrl: API_ENDPOINTS.stt,
},
autoStop,
options: {
mineType: getRecordMineType(),
model: ttsSettings.openAI.sttModel,
},
} as OpenAISTTOptions;
break;
}
case 'browser': {
options = {
autoStop,
} as SpeechRecognitionOptions;
useSelectedSTT = useSpeechRecognition;
break;
}
}
return useSelectedSTT(sttLocale, { ...config, ...options });

上述写法违反 react hooks 规范了,但我一直没时间改,如果有兴趣的话欢迎来个 PR?

@cy948
Copy link
Contributor Author

cy948 commented Mar 20, 2024

@arvinxx 好的,我先研究一下代码

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@arvinxx Okay, let me study the code first

@cy948 cy948 closed this as completed Mar 20, 2024
@lobehubbot
Copy link
Member

@cy948

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Archived in project
Development

No branches or pull requests

3 participants