You can use this card to record your voice and send a wav file via http to a server (e.g. rhasspy).
The card uses recorder.js by addpipe
Download the repositiory and extract it to your home-assistant config directory
. The filestructure should be like this:
<hass-config-folder>
├── custom_components
├── recorder_service
├── __init__.py
├── manifest.json
├── www
├── audio-recorder-card
├── images
├── ...
├── audio-recorder-card.js
Add to your configuration.yaml
:
recorder_service:
Add the resource
to your home-assistant:
url: /local/audio-recorder-card/audio-recorder-card.js?v=0.1
type: module
Goto your Dashboard and add a new card. At the bottom you will find the audio-recorder-card
.
Or you write into the yaml directly type:'custom:audio-recorder-card'
.
attribute | description | example |
---|---|---|
target (required) | the url of the http server you want to send the wav file | http://<your-rhasspi-url>:12101/api/speech-to-intent |
header (optional) | add a header to your recorder card | My awesome recorder |
color (optional) | change the css color attribute of the recorder | ligthgreen |
size (optional) | change the size of the recorder (default=50px) | 100px |
type: 'custom:audio-recorder-card'
target: 'media_player.mpd'
mp3enable: 0
Then the audio recorder card should appear:
to start the recording click once on the record button:
to stop the recording click once again on the recorder button. Now the recording_service will send the wav file to your defined target http server.
At the moment the card is only available in browsers. This function will be added in the next version.
recorder.js: addpipe/simple-recorderjs-demo
css-styling: u_conor
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。