You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey. I'm trying to configure voice recognition to speech and it either does not work or is partially supported. I reassembled the plugin with console commands added, but that didn't work. Maybe you noticed and I'm doing something wrong. And how can this be made to work?
in Plugins\BLUI\Source\Blu\Private\BluManager.cpp
BluManager::CPURenderSettings = false;
/////////////////
command_line->AppendSwitch("off-screen-rendering-enabled");
command_line->AppendSwitchWithValue("off-screen-frame-rate", "60");
command_line->AppendSwitch("enable-font-antialiasing");
command_line->AppendSwitch("enable-media-stream");
command_line->AppendSwitch("enable-speech-input");
command_line->AppendSwitch("enable-speech-api");
command_line->AppendSwitch("enable-speech-synthesis-api");
// Should we use the render settings that use less CPU?
I enclose a working demo html code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Voice recognition and text reading</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="controlbuttons" class="container-fluid" class="d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="speech ()">Listen</button>
<button type="button" class="btn btn-success" onclick="talk ()">Talk</button>
<button type="button" class="btn btn-danger" onclick="stop ()">Stop</button>
</div>
<div class="controlbuttons" class="container-fluid" id="vue">
<h4>Intermediate result: {{ speaktext }}</h4>
<h4 style="color:rgb(63, 70, 172);">You said: {{ speakstoptext }}</h4>
</div>
<script>
// Create a recognizer
var recognizer = new webkitSpeechRecognition();
// We put an option so that recognition starts even before the user finishes talking
recognizer.interimResults = true;
// What language will we recognize?
recognizer.lang = 'en-US';
// We use the callback to process the results
recognizer.onresult = function (event) {
var result = event.results[event.resultIndex];
var text = result[0].transcript;
if (result.isFinal) {
//alert('You said: ' + text);
app.speakstoptext = text;
} else {
//console.log('Intermediate result: ', text);
app.speaktext = text;
}
};
function speech () {
// We begin to listen to the microphone and recognize the voice
recognizer.start();
}
var synth = window.speechSynthesis;
var utterance = new SpeechSynthesisUtterance('How about we say this now? This is quite a long sentence to say.');
function talk () {
synth.speak (utterance);
}
function stop () {
synth.pause();
}
</script>
<script>
var app = new Vue({
el: '#vue',
data: {
speaktext: 'Hello',
speakstoptext: 'Hello'
},
methods: {
speak: function(event) {
this.speak = event.target.value
},
speakstop: function(event) {
this.speakstop = event.target.value
}
}
})
</script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<style>
.controlbuttons {
border: 1px solid powderblue;
padding: 30px;
}
</style>
</body>
</html>
The text was updated successfully, but these errors were encountered:
Hey. I'm trying to configure voice recognition to speech and it either does not work or is partially supported. I reassembled the plugin with console commands added, but that didn't work. Maybe you noticed and I'm doing something wrong. And how can this be made to work?
in Plugins\BLUI\Source\Blu\Private\BluManager.cpp
I enclose a working demo html code:
The text was updated successfully, but these errors were encountered: