|
require(['jcl','wadeMobile'], function($,WadeMobile) {
$('#voiceRecognize').on('touchstart', function() {
WadeMobile.startListen();
});
$('#voiceRecognize').on('touchend', function() {
WadeMobile.endListen(function(val){
$('#voiceText').text(val);
});
});
$('#voiceRecognize').on('touchcancel', function() {
WadeMobile.endListen(function(val){
$('#voiceText').text(val);
});
});
$('#vocicSynthesize').on('touchend', function() {
WadeMobile.voiceSpeak($('#synthesize-content').val());
});
});
|