Using Microphone input

Hello all,
I’m currently working for a research group that is trying to work with spoken responses from subjects. I’ve bumped into several issues getting the mic to work and could really use some help.

URL of experiment: Private at the moment

Description of the problem:
Despite many attempts I can not get the mic input to work. I’m encountering a few different errors but the below is the most consistent.

Unfortunately we encountered the following error:

  • when starting the audio recording for microphone: OnlyMic
  • the recorder has not been created yet, possibly because the participant has not given the authorisation to record audio

Try to run the experiment again. If the error persists, contact the experiment designer.

The experiment itself is extremely simple, I’ve just been trying to test the audio capture and transcription. The only item in the flow is the microphone, which is set to capture 0.5 seconds after the start and ends 2 seconds after that.

Attempts at solutions:

  • I’ve confirmed that the browser is allowing microphone access and is not prompting for additional confirmation.
  • Both Firefox and Chrome were tested and got the same error
  • changing the mic to the default or specific device.

On a final note the documentation for the mic and transcription is very unclear. It appeared from the docs that the google transcription service would be enabled running locally but would of course need to use the network to function. When I went to run the generated python file it reported the google api is not available offline and so we moved to the pavlovia site. If this isn’t correct or I’ve missed something please let me know!

Any and all help would be greatly appreciated.

Your experiment has to have user interaction (e.g. a mouse click or button press) before recording starts.

Thank you very much, I do remember seeing something about that. The application progresses now but still fails on the mic section but now with a new error. I’m getting “TypeError: engine is not a symbol” which to me sounds like the engine is referenced before it’s instantiated but I’m not fluent enough with JavaScript to diagnose or correct it.

Any ideas what could be causing this? Also if this is better suited to a new post please let me know.
Thanks again!

Please could you search for engine is not a symbol and post to one of the existing threads? I’m guessing you are trying to do Google speech to text.

I have searched for this issue and the clearest thread I see is this post? I don’t actually see a resolution in that thread, but I’ll go ahead and move the discussion over there.

1 Like

Found the error is caused by the function

const transcription = await mic.lastClip.transcribe({
  languageCode: 'en-US',
  engine: sound.AudioClip.Engine.google,
  wordList: null
});

The engine line should have ‘google’ in all caps