Closed Tyler-Jay-Stevahn closed 4 months ago
To be clear, it's overwriting the LRC files every time? If so, I might be missing a check, similar to one I have for SRTs.
If my above statement is true, I may have fixed it.
https://github.com/McCloudS/subgen/commit/5b5fba3d82f047cbf3fd216dea92680a3d511bdb
While your implementation would have worked, it still would have ran a transcription (wasting time/resources). This will check before queueing the work.
That solution seems like it would work, I'll have to test it later today and get back to you.
This solution works. If I wanted to get subtitles in Spanish instead of English, how would I do that?
If the source file is in spanish, you would set TRANSCRIBE_OR_TRANSLATE
to transcribe
. Whisper is only trained to translate to english or transcribe in the source audio.
Oh that's a bummer, thanks for letting me know.
Full disclosure, this might just be something I am doing wrong.
I was thinking if you added a "If it doesn't exist" piece of code to these lines it should fix it.
""" if isAudioFileExtension(file_extension) and lrc_for_audio_files: write_lrc(result, file_name + '.lrc') """
Into something like below """ if isAudioFileExtension(file_extension) and lrc_for_audio_files: if exists(): # the file already exists pass else: write_lrc(result, file_name + '.lrc') """