Skip to content

Use Chrome's webkitSpeechRecognition without need to allow mic permission every time #405

Answered by hassandraga
soulchainer asked this question in Q&A
Discussion options

You must be logged in to vote

I can't reproduce the issue, however, I tested it in Ubuntu using Chrome, with latest webui commit.

UI:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mic</title>
</head>
<body>
    <button id="requestMic">Request Microphone Permission</button>
    <script>
        document.getElementById('requestMic').addEventListener('click', () => {
            navigator.mediaDevices.getUserMedia({ audio: true })
                .then(stream => {
                    // Permission granted
                    console.log('Microphone permission granted');
                    stream.getTracks().forEach(t…

Replies: 2 comments 17 replies

Comment options

You must be logged in to vote
13 replies
@neroist
Comment options

@hassandraga
Comment options

@soulchainer
Comment options

@hassandraga
Comment options

@soulchainer
Comment options

Comment options

You must be logged in to vote
4 replies
@soulchainer
Comment options

@soulchainer
Comment options

@hassandraga
Comment options

Answer selected by soulchainer
@soulchainer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants