Hello I am trying to use speech recognition in fivem, the input is detected in the browser but when I do I try it in fivem I don’t get the same result. Actually I get no response at all.
this is what I have gathered so far
try {
var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
var recognition = new SpeechRecognition();
}
catch(e) {
console.error(e);
}
recognition.continuous = true;
recognition.onresult = function(event) {
console.log("Here")
var transcript = event.results[0][0].transcript;
$("#text").val(transcript);
}
navigator.mediaDevices.getUserMedia({ audio: true })
.then(function(stream) {
console.log('You let me use your mic!')
})
.catch(function(err) {
console.log('No mic for you!')
});
recognition.start();