iTranslated by AI
Tech Behind Automated Chapter Generation for Apple Vision Pro Roundtable
Hello, I'm noppe.
Out of the blue, I've started doing this thing called a VTuber.
Here it is:

Is this really a VTuber?
This Apple Vision Pro roundtable is a podcast using Spatial Persona, and I post it roughly once a week.
After recording, I enter chapters into the video description. Something like this↓

This is soooo much work.
Since the videos are usually about an hour long, I have to rewatch content I already know while clicking through.
I'm not doing this channel because anyone told me to, so if it becomes too much of a hassle, it might just fizzle out.
That's why I want to automate these tedious tasks.
Implementing automatic chapter generation
To put it simply: transcribe with Whisper and feed it to Gemini. That's all.
It would be great if chapters could be output directly from the video, but for now, it's a separate process. I don't have the budget for that anyway.
Transcription
I'm using mlx_whisper.
import mlx_whisper
import sys
import datetime
# Get the filename from command line arguments (use default if not specified)
audio_file = sys.argv[1] if len(sys.argv) > 1 else "output_audio.mp3"
# Get the full result object (don't extract with ["text"])
result = mlx_whisper.transcribe(
audio_file,
path_or_hf_repo="mlx-community/whisper-large-v3-mlx",
word_timestamps=True,
language="ja",
)
# Display each speech segment with its timestamp
for segment in result["segments"]:
start_time = segment["start"]
text = segment["text"]
# Convert seconds to HH:MM:SS format
time_str = str(datetime.timedelta(seconds=int(start_time)))
print(f"[{time_str}] {text}")
With a script like this, you get a file like the following:
[0:51:38] Even if a cylinder-like stand comes out, it'll probably be expensive.
[0:51:41] True.
[0:51:43] I can't put anything that takes up space,
[0:51:47] for that hobby.
[0:51:48] It is a hobby, but
[0:51:51] focusing resources on visionOS developers
[0:51:55] for the probability of visionOS success
[0:51:57] seems like it would increase it.
It can process at about 10x speed. It takes about 6 minutes to process a 1-hour file.
But since I'm running it on a MacBook Pro, it's free.
Some parts aren't perfectly phrased, but that doesn't matter. As long as it captures the overall flow, it'll work for generating chapters in the next step.
Chapter Generation
The transcribed file ends up being around 70–90 KB. Initially, I had ChatGPT read it, but when the file was large, it would stop generating chapters about halfway through.

So, I tried running it with Gemini 2.0 Flash, which has a large context size, and it generated clean chapters like this. This is also free.

The prompt I'm using is something like this:
The following text is a transcript of a podcast. To make it easy for viewers to navigate, please divide the entire content into approximately 10 detailed chapters and organize them into YouTube chapter format ("minutes:seconds Chapter Title"). Be mindful of sections where topics or content change, so that viewers can easily access the points they are interested in.
In particular, ensure the entire transcript, including the latter half, is divided into fine, even segments.
Mission Accomplished
And so, the YouTube video chapter generation has been successfully automated.
What a relief!
Discussion