Open Marakai opened 4 years ago
Yes I can! Glad to hear you are interested!
Here's the basic idea though:
Each episode has a markdown file with the subtitles and links to audio clips. Audio clips are all numbered successively starting 001.mp3 and continuing and are contained in a folder named with the number of the episode.
So for episode 5 we have the file:
Shorokuma-Cafe-05.Rmd
(This is an Rmarkdown file only because I use Rstudio to compile everything to html)
and it just consists of the text of the subtitles with links to audio clips below each bit of text. Here's an example:
---
title: "シロクマくん 動物園へ"
---
シロクマくん 動物園へ
<audio controls>
<source src="audio/05/001.mp3">
</audio><hr>
シロクマくん 暇だから 何か問題出してよ
いいよ
<audio controls>
<source src="audio/05/002.mp3">
</audio><hr>
...
The video files that I start from contain two episodes each -- that is why there are files called Shirokuma-Cafe-05-06
which are just plain text subtitle files stripped of all of the extra code.
So my workflow is:
Shirokuma-Cafe-##.Rmd
with ## as the number of the episode.It's really pretty simple -- I use markdown files and Rstudio to save me from having to write lots of html files.
The time consuming part is obviously doing the audio editing and putting together the markdown files, but then that is good language practice too!
If you'd like to do an episode the cleaned-up subtitle files for episodes 15 through 20 are in the repo and you can pick one to work on. Since the videos contain two episodes each the numbering is slightly confusing. So the original video file called "Episode 8" ends up as episodes 15 and 16 here.
Does that sound like something you'd want to help with?
I'm a devops guy, so this to me screams out for automation! SK is my big target for immersion - from what I've seen the show is hilarious and they avoid too much slang or slurred speech.
So, the ffmpeg is obviously easily scriptable. Does Rstudio have a CLI/API?
EDIT: Just saw that there is indeed a CLI and a whole scripting language underneath.
The Audacity part may be the hardest because at some point you still have to visually check and mark the extraction points. Wonder if there's cloud tools that could help with that.
I agree about the series it is great for immersion and that's what I have been using it for too!
Automation would be nice for this project too, though as you mention the audio is the sticking point there. Maybe the way to speed things up would be to manually mark the cuts in the whole audio file and then use something like ffmpeg to extract segments into individual clips. The only issue there is that I tend to skip over those parts of the soundtrack with musical interludes and sound effects and just focus on the dialogue.
As for Rstudio I just use it as an IDE for some projects. In this case the R part of things (the scripting language) is more or less irrelevant. I just use Rstudio as a front end for pandoc which is what it relies on to convert the markdown files into html files and then builds a static website from the html according to the specs in a yaml file. So it's really pretty simple to setup.
ETA: Apparently in Audacity you can add an extra "label track" which allows you to mark off regions of a file for multiple clip extraction, which would speed up the process a bit. I'll try it out. Not quite pure CLI automation, but still maybe more efficient.
Ooof, that's where I utterly lack experience - I can barely glue two songs together in Audacity. See also my comment in Patreon.
Honestly though, even if it is a bit labor intensive, it is also more immersion to listen to the audio track and cut sections out while reading through the subtitle text! The method I mentioned -- adding markers to what Audacity calls a "label track" and then mass exporting the clips does seem to work fairly well.
Can you update the docs on how to contribute? (red kokeshi here)