microphone not authorized
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
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
- microphone not authorized
- Can't use stt in Chat,while use source code deployment.
- web/.env.example
- docker/nginx/conf.d/default.conf
- web/i18n/en-US/common.ts
- en/features/prompt-engineering/README.md
- api/core/tools/provider/builtin/stability/stability.yaml
- web/app/components/base/voice-input/index.tsx
- api/services/audio_service.py
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.
are you using https instead of http? AFAIK, web microphone works either for localhost or https websites
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
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?
same error, Android side how to fixed?