dify icon indicating copy to clipboard operation
dify copied to clipboard

microphone not authorized

Open deepeye opened this issue 1 year ago • 2 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] 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

deepeye avatar May 17 '24 09:05 deepeye

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[bot] avatar May 17 '24 09:05 dosubot[bot]

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

lancemao avatar May 20 '24 05:05 lancemao

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

@lancemao how to publish the https URL, mine always http

zyh3826 avatar Aug 02 '24 08:08 zyh3826

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

Using https can be recognized normally, but on the Android side, it often does not work properly, what is the reason for this, is clear?

lvxinliang avatar Nov 04 '24 15:11 lvxinliang

same error, Android side how to fixed?

lonngxiang avatar Jan 06 '25 01:01 lonngxiang