I wrote a voice command application for VUEJS, but once I press the talk button, it does not work again, I need to refresh the page, how can I solve this problem?
My Code;
<div class="input">
<button
class="talk"
:disabled="isRecording"
@click="startListening"
>
<i class="fas fa-microphone-alt" />
</button>
<h1
class="content"
@click="startListening"
>
Konuş
</h1>
</div>
I tried this for a solution
stopRecognition() {
const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)()
recognition.stop() // Stop speech recognition
this.isRecording = false // Set recording status to false
},
I tried to write the above function and call it with this.sasad but still can’t press the button for the 2nd time