Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech too fast and out of sync #19

Closed
agenceblink opened this issue Feb 17, 2024 · 5 comments
Closed

Speech too fast and out of sync #19

agenceblink opened this issue Feb 17, 2024 · 5 comments

Comments

@agenceblink
Copy link

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!

@R3gm
Copy link
Owner

R3gm commented Feb 17, 2024

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.

@Slyfoxleo
Copy link

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!

@R3gm
Copy link
Owner

R3gm commented Feb 19, 2024

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.

@agenceblink
Copy link
Author

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

@R3gm
Copy link
Owner

R3gm commented Feb 23, 2024

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

@R3gm R3gm closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants