An other way, with Rhasspy, an open source, fully offline set of voice assistant services for many human languages, if this should help you :
Container
docker run -p 12101:12101 \
-v "$HOME/.config/rhasspy/profiles:/profiles" \
-v "/etc/localtime:/etc/localtime:ro" \
-d --restart unless-stopped \
-v /var/lib/docker/volumes/Media/_data:/profiles/Media \
--device /dev/snd:/dev/snd \
--name rhasspy \
rhasspy/rhasspy \
--user-profiles /profiles \
--profile fr
Configuration
rest_command:
rhasspy_play:
url: 'http://192.168.1.6:12101/api/play-wav'
method: 'POST'
payload: '{{ payload }}'
Automation
- id: '1636909817124'
alias: Il est l or
description: ''
trigger:
- platform: event
event_type: rhasspy_GetTimePlus
condition: []
action:
- service: rest_command.rhasspy_play
data:
payload: /profiles/Media/monsignor.wav
mode: single