Still looking for an audio and TTS solution for the jack 3.5 of Pi4 ?
I can explain the solution i’m using with none of the above problems you talking about ! And yes i know VLC is just bul@#&t
You will have to install:
CHIME TTS (HACS): GitHub - nimroddolev/chime_tts: A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
Google TTS or another one (must be set in CHIME TTS).
And NOTIFIER ADD-ON by GUIDO: GitHub - guido-syseng/Hassio-Addons
All audio files have to be in /config/www/audio/ wich is equal to /local/
the “Audio Out” setting in Notifier : “Built-in audio stereo” because “default” can sometime causes problem: no audio send to jack 3.5 !
Explanation:
chime_tts.say_url creates an mp3 based on the text message you’ll pass to it.
This mp3 file will be saved in /local/audio/ (/config/www/audio/)
The filename of this mp3 is retrieved by extracting the filename part of the url that the chime_tts.say_url service return as a service response !
Notifier Add-on is then used to read the mp3 file to rpi 4 built-in audio jack.
All these scripts are “queued” so no message can be lost.
script_audio:
sequence:
- delay:
milliseconds: 100
#----------------------------------------
- service: hassio.addon_stdin
continue_on_error: true
data_template:
addon: 3ebf62bd_notifier
input:
volume: 100
# wav et mp3 files in \config\www\audio
music: audio/"{{ audiofile }}"
#----------------------------------------
mode: queued
Example of call for playing a sound:
#
- service: script.turn_on
target:
entity_id: script.script_audio
data:
variables:
audiofile: your_file.wav
#
Allways call the same script (script_audio) for any audio so you’ll avoid playback conflict thanks to the queued mode !
The TTS section below that also use the above script for the playback on pi4 jack 3.5
chime_tts_say_url_and_play:
variables:
temp: ""
sequence:
- action: chime_tts.say_url
data:
# chime_path: /config/www/audio/bell.wav
message: "{{ message }}"
tts_platform: google_translate
language: "fr-fr"
response_variable: chime_tts_say_url_response
#----------------------------------------
- if: "{{ chime_tts_say_url_response['success'] == true }}"
then:
- service: input_text.set_value
target:
entity_id: input_text.chime_tts_say_url_mp3_filename
data:
value: >
{% set temp = chime_tts_say_url_response['url'] %}
{{ (temp.split("audio/")[1]) }}
- service: script.turn_on
target:
entity_id: script.script_audio
data:
variables:
audiofile: "{{ states('input_text.chime_tts_say_url_mp3_filename') }}"
else:
# Warn if above return a error (success=false)
#----------------------------------------
- service: script.turn_on
target:
entity_id: script.script_audio
data:
variables:
audiofile: your_error_warning_sound_file.wav
#
mode: queued
Don’t forget to define in your input_text definitions:
input_text.chime_tts_say_url_mp3_filename
Example of calling the TTS script above:
- service: script.turn_on
target:
entity_id: script.chime_tts_say_url_and_play
data:
variables:
message: This is an example - ceci est un exemple !
Do not forget to change language: “fr-fr” to what your langage is 
You can easely customize the annoucement, read the CHIME TTS documentation.