[Python] Python gtts vlc plays too quickly to hear the first couple words

Discussão em 'Python' iniciado por Stack, Abril 14, 2025.

  1. Stack

    Stack Membro Participativo

    In python, using the module gTTS and VLC-python, I've created a Text to speech program, which is quite simple to do.

    But the thing which is bugging me is when I get to playing the mp3 file created by gTTS it skips the first word or two.

    So if I have the string "The weather today will be cloudy". It'll speak out "today will be cloudy"

    Even if I adjust the string, it seems to miss out the first word or two, sometimes it starts mid word.

    When I play the audio file outside of the code, it plays normally, sometimes it stutters on the first word but if I rewind and have it wait a second, it plays perfectly.

    Is there a way to load the audio clip or buffer it before playing so it starts smoothly?

    Continue reading...

Compartilhe esta Página