voicerecorder.record

The VoiceRecorder element is deprecated since PennController 1.8. See mediarecorder.record instead.

getVoiceRecorder(id).record()

Starts recording audio.

Example:

[js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”);

newTrial(
newVoiceRecorder(“recorder”)
.record()
,
newTimer(“recording”, 2000)
.start()
.wait()
,
getVoiceRecorder(“recorder”)
.stop()
.play()
.wait(“playback”)
);[/js]

Will record audio for 2s and then play it back.