// Create a SpeechRecognition object
const recognition = new SpeechRecognition();
// Add an event listener for the "result" event
recognition.addEventListener("result", (event) => {
const transcript = event.results[0][0].transcript;
console.log(transcript); // Log the recognized speech
});
// Start the recognition
recognition.start();