Audio recording

The audio recording extension lets you record and play back audio with the micro:bit. If your version of the micro:bit has a microphone you can record a brief amount of audio and play it back on the speaker or at a sound output pin. Audio that you record is stored in an audio buffer and can be played later or recorded over with new audio.

Works with micro:bit V2

works with micro:bit V2 only image

Using these blocks requires the micro:bit V2 hardware. If you use any blocks that attempt access flash memory on a micro:bit v1 board, you will see the 927 error code on the screen.

Blocks in this extension

Record and play

record.startRecording(record.BlockingState.Blocking)
record.playAudio(record.BlockingState.Blocking)

Settings

record.setSampleRate(11000)
record.setMicGain(record.AudioLevels.Low)

Status

record.audioStatus(record.AudioStatus.Playing)

See also

start recording, play audio, set sample rate, set mic gain, audio status

audio-recording