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

microphone not authorized #4485

Open
4 tasks done
deepeye opened this issue May 17, 2024 · 2 comments
Open
4 tasks done

microphone not authorized #4485

deepeye opened this issue May 17, 2024 · 2 comments
Labels
🐞 bug Something isn't working 🤔 cant-reproduce This issue can not be reproduced

Comments

@deepeye
Copy link

deepeye commented May 17, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

why after enabling voice-to-text, when clicking the microphone, it keeps saying that the microphone is not authorized? Both the operating system and the browser have released it.

Docker Compose Deployment for me。

✔️ Expected Behavior

support voice to text

❌ Actual Behavior

tips: microphone not authorized

Copy link

dosubot bot commented May 17, 2024

It looks like the issue with the microphone not being authorized could be due to how the application is handling microphone permissions. In the Dify application, when attempting to use the voice-to-text feature, the application should request microphone permissions from the browser. If permissions are not correctly handled or if the browser blocks the request, you might encounter the "microphone not authorized" message.

To address this, you can modify the function that handles the microphone permission request in the application code. Specifically, you can improve error handling in the handleVoiceInputShow function to provide more informative feedback to the user. Here's a brief overview of what you might consider adding:

  • Log the error and display a message to the user with clear instructions on enabling microphone access in the browser settings.
  • Consider showing a modal or notification with detailed steps on how to allow microphone access.

Additionally, ensure your application is served over HTTPS, as modern browsers require secure contexts for features like microphone access. If your application is not using HTTPS, this could be the root cause of the issue. To resolve this, you would need to obtain an SSL/TLS certificate for your domain, configure your web server to use the certificate, and ensure your application's configuration uses HTTPS URLs.

By implementing these changes, you should be able to provide a clearer path for users to enable microphone access and use the voice-to-text feature successfully.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 17, 2024
@crazywoola crazywoola added the 🤔 cant-reproduce This issue can not be reproduced label May 18, 2024
@lancemao
Copy link
Contributor

are you using https instead of http? AFAIK, web microphone works either for localhost or https websites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🤔 cant-reproduce This issue can not be reproduced
Projects
None yet
Development

No branches or pull requests

3 participants