This integration can record your voice in mobile apps and computer browsers and save the recording files.
Tip
If you encounter a bug during use,
please enable debug mode in the integration and try the original operation,
then open issues and post the log.
-
It is recommended to use HACS to install. If you want to install manually,
please put the voice_recorder folder in custom_components folder,
and restart Home assistant. -
After the restart is completed, search for Voice Recorder in the integration and set it up, then configure voice-recorder-card:
type: custom:voice-recorder-card
token: your token
event_options:
- abc // option1 is default eventname
- 123
- other
notify: bool // The default value is false.
button_mode: click or hold // The default value is click.
Tip
1.Please generate a permanent token in HA.
2.If you encounter problems about allowlist_external_dirs
, please refer here.
3.event_options(optional) is the event name option, multiple names can be pre-set.
4.notify (optional) determines whether a notification is sent when a file is successfully saved.
Important
You don’t need to create a folder manually. The integration will automatically create a folder based on the path you’ve set.
If your path starts with /media
, it will create the folder under the /media
, if the path doesn’t start with /media
, it will create the folder under the /homeassistant
.
- After the recording file is successfully saved, a
voice_recorder_saved
event will be sent, which can be used as a trigger. The event data are as follows:
{
"browserID": # browserID,
"eventName": # Custom event name,
"filename": # File name,
"path": # File path,
"size": # File size,
}
Important
browserID: You must install browser_mod to generate an ID, otherwise it will be displayed as null
.
- Part of the code writing method is referenced ha_cloud_music and hass-browser_mod.
- The card uses
Recorder.js
from xiangyuecn. Thanks to them for their project! - Thanks to tester isaac.