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] Speech to text do not show alerts when no openai API key is present #5012

Open
stone-w4tch3r opened this issue Dec 13, 2024 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷 tts TTS/STT

Comments

@stone-w4tch3r
Copy link
Contributor

📦 Environment

Docker

📌 Version

v1.36.3

💻 Operating System

macOS

🌐 Browser

Firefox

🐛 Bug Description

I tried to use STT in firefox with openai provider. I forgot to enter Openai API key. Also I enabled "Auto Stop Speech Recognition". When I tried to use STT, it did not warned me about it, and after ending speech recording nothing happened, neither successful text recognition, nor error.

📷 Recurrence Steps

  1. Open lobe chat
  2. In Text-To-Speech settings select openai as provider (default)
  3. In Text-To-Speech settings enable "Auto Stop Speech Recognition"
  4. Start new chat
  5. Click STT icon
  6. Recording starts without warning, when stopping recording by pressing same button again, there will be no text and no warnings

🚦 Expected Behavior

When clicking STT icon a warning appears and STT functionality is disabled, or at least there will be a warning after recognition, as when "Auto Stop Speech Recognition" is disabled

📝 Additional Information

No response

@stone-w4tch3r stone-w4tch3r added the 🐛 Bug Something isn't working | 缺陷 label Dec 13, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Dec 13, 2024
@lobehubbot
Copy link
Member

👀 @stone-w4tch3r

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Dec 13, 2024

The issue you're experiencing seems to be related to the lack of error handling for missing API keys in the STT feature when using the OpenAI provider. The application is expected to throw an AgentRuntimeError with the error type InvalidProviderAPIKey if no API key is provided [1]. However, it appears that this error is not being displayed as an alert in your case.

The Alert component from @lobehub/ui is typically used to display such warnings or alerts related to STT errors [2]. It seems that the alert is not being triggered correctly when the API key is missing.

To address this, you might want to check if the error handling logic is correctly implemented in the part of the code that manages the STT functionality. Specifically, ensure that the error is being caught and passed to the UI component responsible for displaying alerts. This might involve verifying the integration between the error handling mechanism and the UI alert system.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the tts TTS/STT label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 tts TTS/STT
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants