javascript - How to send sound input from HTML to server -
i need send sound input server. can send variable? should in function start_microphone()
, , methods of audiocontext()
should use?
var input = null; var webaudio_tooling_obj = function() { var audiocontext = new audiocontext(); console.log("audio starting ..."); var buff_size = 16384; var audioinput = null, if (!navigator.getusermedia) navigator.getusermedia = navigator.getusermedia || navigator.webkitgetusermedia || navigator.mozgetusermedia || navigator.msgetusermedia; if (navigator.getusermedia) { navigator.getusermedia({ audio: true }, function(stream) { start_microphone(stream); }, function(e) { alert('error capturing audio.'); }); } else { alert('getusermedia not supported in browser.'); } function start_microphone(stream) { /////////////////// } }(); function sendinput() { $(document).ready(function() { $("button").click(function() { $.post("/tuner/getfreq/", { "sound": input }, function(data, status) { document.getelementbyid("post").innerhtml = data; }); }); }); }
Comments
Post a Comment