At the moment, my search function utilizes cordova-based voice recognition.
Here is the HTML code:
<div class="bar bar-header item-input-inset">
<label class="item-input-wrapper">
<i class="icon ion-ios-search placeholder-icon"></i>
<input type="search" ng-model="search" id="in" placeholder="Search">
</label>
<button class="button button-small" ng-click = "recognizeSpeechSearch()">
<i class="icon ion-mic-a"></i>
</button>
</div>
And here is the JavaScript code:
$scope.recognizeSpeechSearch = function(){
var maxMatches = 1;
var promptString = "Speak now"; // optional
var language = "ms-MY"; // optional
window.plugins.speechrecognizer.startRecognize(function(result){
alert(result);
$scope.search = result;
}, function(errorMessage){
console.log("Error message: " + errorMessage);
}, maxMatches, promptString, language);
}
However, I am facing an issue where the input provided through voice does not update in my search text area and perform search filter. Can anyone provide assistance on this matter? Thank you.