Google TTS stops mid-sentence and then continues again or cuts off the start off a sentence

Hi everyone, my google tts is not working properly as it stops for about a second in the middle of a second before continuingand sometimes it just cuts off the start of a sentence for this I looked at various articles and tried to add silence at the start of the sentence like this:

 media_player:
  - platform: vlc
    name: speaker_1
    pre_silence_duration: 0.5
    post_silence_duration: 0.5
    arguments: '--alsa-audio-device=hw:1,0'

but it still does not seem to work. I even tried the silences up to 5 seconds but still doesn’t work. I tried using the same sentence twice but it still stops working mid-sentence before continuing after a second or two. I am not sure what to do, any suggestions on how to solve this issue? Thanks in advance

I have the exact same issue on my RPi4 64 installation as @Dishant described, more than 3 years later. The issue seems to be with the VLC player integration, as I have no issues playing audio from Spotify.

I can add that in my experience:

  • The first time playing audio files or TTS service calls usually works correctly, but after the 2nd+ time the issue is introduced and persists. This occurs even when caching is disabled.
  • If the sound file is long enough (5+ seconds), only the first few seconds are affected. Adding silence to the beginning of the sound file (as opposed to delaying playback) is not a good solution as I want to use TTS feedback in response to sensor changes in a timely manner.

Raspberry Pi4 64
Core: core-2021.11.5
Supervisor: supervisor-2021.12.1