Language Shadowing with subed in Emacs


So I'm trying to improve my English speaking skill by shadowing while watching TV episodes. The workflow before was to loop over video clips using mpv:

  1. hit l to mark the start of the loop
  2. play the video and wait for it to be at the end of the loop
  3. hit l again to mark the end

Then mpv will loop over the clip, it basically works, but it's a bit hard and tedious to set the start and end precisely.

Recently, I came up with an idea that I can practice language-speaking using subtitle files, as they already have the timestamps along with subtitle texts. I can loop over specific parts of a video file easily by taking advantage of those timestamps instead of manually setting the start time and end time of the playback and then looping over it.

And then I thought of a package, subed, which caught my eyes when I was lurking around Sacha Chua's blog site. And I found that it was perfect for this idea after playing with it for ~10 minutes.

/img/2022-01-12-language-shadowing-subed-emacs.jpg
subed and mpv side by side

Here are the steps:

  1. Open a subtitle file, say /path/to/foo.srt, subed will automatically open the accompanying video file having the name foo.mp4/foo.mk4/foo.avi, etc. using mpv.
  2. Then, in the subtitle buffer, only these three key bindings will do the job:

    1. C-c C-l toggles looping over the current subtitle By default, there is an extra second before and after the time span, as specified in the config subed-loop-seconds-before & subed-loop-seconds-after.
    2. M-n moves the point to the next subtitle, and it automatically seeks the playback to the corresponding timeline.
    3. M-p moves the point to the previous subtitle and seeks the playback to the correct position of the timeline.

Although the package is designed to edit subtitles efficiently, it could also shine in language shadowing and speaking.

If you're also learning to speak foreign languages, I believe this workflow can help you.✌

Also on:


See also

comments powered by Disqus