SoniTranslate icon indicating copy to clipboard operation
SoniTranslate copied to clipboard

Speech too fast and out of sync

Open agenceblink opened this issue 2 years ago • 5 comments

Hello and congratulations for this work! I just tested a lot of other projects and yours is clearly the most efficient :)

Unfortunately and I do not understand why: the speech of the translation has a speed like x10 and we do not understand anything of course ^^ and then 15 seconds later, the speech speed returns to a correct speed. Here is a short extract to illustrate the problem: FinalTest

Could you give me a clue so that I can find a solution?

(for the same project, I've done a transcription + translate with wisper without any problems, but I'm missing the voice translation and video sync).

Many thanks in advance for your reply!

agenceblink avatar Feb 17 '24 18:02 agenceblink

Hello,

The TTS generates segments individually and then combines them into a single audio file. Sometimes, the duration of these segments exceeds the expected timeframe, causing overlap. To compensate, the program accelerates some segments based on their timestamps. Whisper may not always detect precise start and end timestamps, leading to accelerated segments when it shouldn't.

To address this issue, you can adjust the maximum speech acceleration for all segments in:

Advanced Settings

Max Audio Acceleration

The default value is 1.9. You can try other values like 1.5 or 1.0 to disable the acceleration. However, be cautious as this may cause some segments of speech to overlap.

R3gm avatar Feb 17 '24 19:02 R3gm

Thanks for the great work! Is it possible to slow down the video itself so that the audio segment comes in at normal speed? Thank you!

Slyfoxleo avatar Feb 18 '24 21:02 Slyfoxleo

Thanks for the great work! Is it possible to slow down the video itself so that the audio segment comes in at normal speed? Thank you!

At the moment, that feature isn't available, but I'll keep it in mind for future updates. In the meantime, you can slow down the entire video before processing it to achieve the desired effect.

R3gm avatar Feb 19 '24 18:02 R3gm

Your answer is as precise as your work! Thanks man :) Question in passing: are you thinking of porting your script to Pinokio?

agenceblink avatar Feb 21 '24 17:02 agenceblink

I haven't heard of it before, but I'll definitely look into it, thanks!

R3gm avatar Feb 23 '24 21:02 R3gm