Skip to Content

Using speech webkit for an Input field to accept the voice command for an event to trigger in SAPUI5 Application.


Demo Video: https://www.youtube.com/watch?v=B3RvdfcLOW8

var vlayout = new c.layout.MatrixLayout();

var vpanel = new c.Panel().setText(“Quick Links”);

  • vpanel.addContent(new c.Button(“myButton”,{

text: “Click here to Navigate thru Speech”,

tooltip: “please click me”,

press: function() {

$(‘#myButton’).after(‘<input id=”mic” onwebkitspeechchange=”transcribe(this.value)” x-webkit-speech>’);

function transcribe(words) {

  1. document.getElementById(“mic”).value = words;

if (words == null) {

alert(“No keyword assigned-” + words );

} else if (words == “1”) {

  • oShell.setSelectedWorksetItem(“wi_home_guest”);
  • oShell.setContent(getContent(“wi_home_guest”));

}

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply