<mic>
A voice recorder with a record button, a live waveform, a timer and playback of the last take.
This tag needs a microphone, so try it on your phone.
<column style="gap-8 w-full">
<text style="font-bold">Voice memo</text>
<mic id="memo"
color="red"
max-duration="60"/>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
color |
Accent color for the record button and waveform. color |
|
controls |
Built-in record/playback bar; false to compose your own from commands. boolean |
true |
format |
wav (default), opus or flac; any other value records AAC-LC. string |
wav |
max-duration |
Auto-stop after N seconds. number |
|
playback |
Playback controls for the last take. boolean |
true |
speed |
Playback-speed control. boolean |
false |
timer |
Elapsed-time readout. boolean |
true |
volume |
Volume control. boolean |
false |
waveform |
Live waveform while recording. boolean |
true |
Commands
| Name | What it does |
|---|---|
effect |
Post-process the last take (WAV only, not on web): reverse, speed, pitch, chipmunk, deep, echo, reverb, bass, treble, distortion, telephone, robot, whisper, fadein, fadeout, normalize, volume; reset/original restores it. |
pause |
Pause the recording, else playback. |
play |
Play the last take. |
record |
Start recording. |
resume |
Resume a paused recording, otherwise start playback. |
speed |
Playback rate. |
stop |
Stop the recording if one is running, otherwise stop playback. |
toggle |
Record ↔ stop. |
volume |
Playback volume 0.0–1.0. |
Readings
| Name | What it does |
|---|---|
duration |
The recording's length in whole seconds. |
path |
The last recording's path. |
paused |
Whether a recording is paused. |
playing |
Whether the recording is playing back. |
recording |
Whether it is recording. |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.