Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to display SRT subtitles for an audio file (Read 631 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

How to display SRT subtitles for an audio file

Hi,

Using Whisper, I can generate SRT subtitles from audio files, which are particularly useful to understand podcasts in a foreign language.

However, my problem is that I can't display the subtitles while playing the audio file. The closest I've been is VLC, which recognizes the SRT file and, in theory, opens it, but displays nothing.

The only solution I can think of is dragging my audio file into MKVToolNix to produce an MKV video file out of it, but it's a workaround I'd like to avoid.

Could anybody recommend an audio player that can display SRT subtitles for audio files?

Thanks!

Re: How to display SRT subtitles for an audio file

Reply #1
mpv.
You may want either --force-window=yes or --cover-art-file=/path/to/some/background.jpg


Re: How to display SRT subtitles for an audio file

Reply #3
mpv.
You may want either --force-window=yes or --cover-art-file=/path/to/some/background.jpg

Thank you. It does work! I can see that mpv isn't quite like the other multimedia players. It's quite minimalistic and, for example, I can't seem to find the settings: do you need to use commands for that?

Would you have another suggestion in the shape of a more traditional multimedia player? In any case, this one works and I'll use it for this particular purpose. Thanks again!

Re: How to display SRT subtitles for an audio file

Reply #4
foobar2000 with ESLyrics component https://github.com/ESLyric/release/releases to display the subtitles as lyrics (with the included srt parser script https://github.com/ESLyric/scripts/blob/main/parser/srt.js)


Thank you! I've installed the extension foo_uie_eslyric.fb2k-component, but it doesn't support SRT subtitles. You've pointed me to a script, but I don't know what to do with the code. Could you give me a clue, please?

Re: How to display SRT subtitles for an audio file

Reply #5
Go
foobar2000 with ESLyrics component https://github.com/ESLyric/release/releases to display the subtitles as lyrics (with the included srt parser script https://github.com/ESLyric/scripts/blob/main/parser/srt.js)


Thank you! I've installed the extension foo_uie_eslyric.fb2k-component, but it doesn't support SRT subtitles. You've pointed me to a script, but I don't know what to do with the code. Could you give me a clue, please?
Open preferences , Tools / Eslyrics / Lyric Option, Lyric sources click on Get More ,.. (top right) -  select SRT parser and Download to install.

https://imgur.com/a/tphDm1U

Re: How to display SRT subtitles for an audio file

Reply #6
Thank you, @zeremy ,

I've followed your instructions successfully. However, the extension is doing strange things to the subtitles, so I'd need to get into Github and maybe open a thread: on the one hand, it's altering the timing, and on the second hand, it's only taking the first line of each subtitle.

Re: How to display SRT subtitles for an audio file

Reply #7
Thank you, @zeremy ,

I've followed your instructions successfully. However, the extension is doing strange things to the subtitles, so I'd need to get into Github and maybe open a thread: on the one hand, it's altering the timing, and on the second hand, it's only taking the first line of each subtitle.
The components thread on HA is
https://hydrogenaud.io/index.php/topic,122571.0.html

Maybe you could check the timestamps in the srt file are valid to the audio files duration, and that it is seekable

Re: How to display SRT subtitles for an audio file

Reply #8
Thank you for the information, @zeremy !

I'll keep trying and provide feedback if necessary!



Re: How to display SRT subtitles for an audio file

Reply #11
Thank you, @zeremy ,

I've updated the SRT parser to version 0.2, but I don't notice any differences. Actually, as you can see on the screenshot, the displayed timing is weird, as the extension keeps showing 00.00.00 for the first subtitles, although, at some point, it does show proper numbers. Despite this, the subtitles do appear when they are supposed to, but only showing the first line of each subtitle.

https://drive.google.com/file/d/19CaBvs906pPd0ONtS76DGY8tTuSLDugz/view?usp=sharing

My SRT file has been produced with Subtitle Edit and it looks fine to me.