EtienneAb3d/WhisperTimeSync

Memory error when synchronising longer texts

ext666 opened this issue · 2 comments

Hi, when I try to sync subtitles longer than about 30 minutes, WhisperTimeSync gives me the following error:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.cubAIx.WhisperTimeSync.CubaixAlignerSimple.align(CubaixAlignerSimple.java:42)
at com.cubAIx.WhisperTimeSync.CubaixAlignerSimple.syncMarks1to2(CubaixAlignerSimple.java:16)
at com.cubAIx.WhisperTimeSync.WhisperTimeSync.process(WhisperTimeSync.java:48)
at com.cubAIx.WhisperTimeSync.WhisperTimeSync.main(WhisperTimeSync.java:91)

I solve it by splitting the subtitles into two parts, but it's not very comfortable.

@ext666

Yes, as said at the bottom of the ReadMe, this aligner is RAM-consuming and time-consuming for large files.

But, you can increase the amount of RAM available to the JVM to a higher value (2G in the command line example), depending on the machine capability:

java -Xmx2G -jar ...

It should be a sufficient solution for your case.

Works perfectly, thank you!