p5.Speech with Microphone Input

So I’m trying to make the SpeechRec work with the AudioIn, to adjust the font size according to the volume level.

But for some reason I don’t get any data from the AudioIn, I don’t see anything on the console.

I’m only a beginner, so can you please tell what I’m missing?

Thank you!

var mic;

function setup() {
	mic = new p5.AudioIn();
	let lang = navigator.language || 'en-US';
	let SpeechRec = new p5.SpeechRec(lang, gotSpeech);

	let continuous = true;
	let interim = true;
	SpeechRec.start(continuous, interim);

function gotSpeech() {
		var vol = mic.getLevel();

		if (SpeechRec.resultValue) {

1 Like