Memory error when synchronising longer texts
ext666 opened this issue · 2 comments
ext666 commented
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.
EtienneAb3d commented
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.
ext666 commented
Works perfectly, thank you!