Skip to content

Instantly share code, notes, and snippets.

@grudelsud
Created April 23, 2013 09:12
Show Gist options
  • Save grudelsud/5442042 to your computer and use it in GitHub Desktop.
Save grudelsud/5442042 to your computer and use it in GitHub Desktop.
sample code of mic level + webspeech. the code kind of works, but asks twice for mic authorization.
var that = this;
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function()
{
var context = new webkitAudioContext();
navigator.webkitGetUserMedia(
{
audio: true
},
function(stream)
{
var liveSource = context.createMediaStreamSource(stream);
var levelChecker = context.createJavaScriptNode(1024, 1 ,1);
liveSource.connect(levelChecker);
levelChecker.connect(context.destination);
levelChecker.onaudioprocess = that.processAudio;
}
);
that.isRunning(true);
};
@vndevil
Copy link

vndevil commented Jun 1, 2023

Hi,

How to get mp3 file with Web Speech API?

@grudelsud
Copy link
Author

hi @vndevil sorry but this code is not maintained anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment