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 2264 times) previous topic - next topic
0 Members and 1 Guest 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.





Re: How to display SRT subtitles for an audio file

Reply #16
While SRT subtitles are primarily intended for video content, there are a few audio players available that can display SRT subtitles alongside audio files. Here are a couple of options you can try:

1. PotPlayer is a versatile media player that supports various file formats and offers subtitle support for both video and audio files. It can display SRT subtitles for audio files during playback. You can download PotPlayer from its official website.

2. Foobar2000 is a lightweight and customizable audio player that supports various audio formats. Although it's primarily an audio player, it has a plugin called "foo_subtitle" that enables the display of SRT subtitles for audio files. You can download foobar2000 from its official website and install the "foo_subtitle" plugin from the Foobar2000 component repository.

Both of these players should allow you to load and display SRT subtitles alongside your audio files. Give them a try and see which one works best for your needs.

Re: How to display SRT subtitles for an audio file

Reply #17
Thanks, @LousyMyor

Re: How to display SRT subtitles for an audio file

Reply #18
Pretty sure MPV can do that as well.
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Re: How to display SRT subtitles for an audio file

Reply #19
While SRT subtitles are primarily intended for video content, there are a few audio players available that can display SRT subtitles alongside audio files. Here are a couple of options you can try:

1. PotPlayer is a versatile media player that supports various file formats and offers subtitle support for both video and audio files. It can display SRT subtitles for audio files during playback. You can download PotPlayer from its official website.

2. Foobar2000 is a lightweight and customizable audio player that supports various audio formats. Although it's primarily an audio player, it has a plugin called "foo_subtitle" that enables the display of SRT subtitles for audio files. You can download foobar2000 from its official website and install the "foo_subtitle" plugin from the Foobar2000 component repository.

Both of these players should allow you to load and display SRT subtitles alongside your audio files. Give them a try and see which one works best for your needs.
could you provide a link to the plugin foo_subtitle, I seem I can't find in the official components page?

Re: How to display SRT subtitles for an audio file

Reply #20
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?
Yes, by default mpv relies on config files for settings.
But there are also some GUIs for it, like mpv.net or ImPlay.

Re: How to display SRT subtitles for an audio file

Reply #21
could you provide a link to the plugin foo_subtitle, I seem I can't find in the official components page?
It doesn't exist. You're replying to a ChatGPT spambot.

Re: How to display SRT subtitles for an audio file

Reply #22
could you provide a link to the plugin foo_subtitle, I seem I can't find in the official components page?
It doesn't exist. You're replying to a ChatGPT spambot.
Thanks, you confirmed my suspicion the reply was ChatGPT

Reported to admins