Show HN: trv. A tool to turn a presentation and speaker notes into a video
github.comVideos can be very effective in teaching, but I myself never make them because I don't like narrating videos nor video editing. So that got me thinking whether text-to-speech can be used to generate videos automatically. That's what I hacked together now in the `trv` Rust crate (it's a binary that you can install via cargo install, see https://github.com/transformrs/trv for the source code and docs).
It's a tool that you can give a Typst presentation with speaker notes to. Next, the tool will turn the Typst file into images and audio, and then turn everything into a video.
For example, I made one I video about a blog post that I wrote earlier. Unfortunately, I cannot directly upload a video here on HN, so here is a link: https://youtu.be/vn8-Asioxq8.
To give an idea of how the video was made, here is the first slide of the Typst presentation:
#import "@preview/polylux:0.4.0": *
#set page(paper: "presentation-16-9", margin: 1in)
#set text(size: 30pt)
#slide[
#toolbox.pdfpc.speaker-note(
```md
Iterators are pretty cool.
For example, in Python we could write the following code in a normal loop.
Here we have a list of 3 values and we add 1 to each value.
This returns a new list with the values `[2, 3, 4]`.
```
)
```python
values = [1, 2, 3]
for i in range(len(values)):
values[i] += 1
print(values)
# [2, 3, 4]
```
]
Next, I ran the following command: $ trv --input=presentation.typ \
--model='hexgrad/Kokoro-82M' \
--voice='am_liam' \
--release"
This created a video of 1.2 MB that I then uploaded to YouTube.Is a tool like this useful? What are your thoughts?
This idea seems fantastic. One of my back-burner projects is a suite of lower-level video rendering software in Python, but this would let me get certain videos out the door much more quickly, I'm sure.
It might be a good idea to link "Typst" in the README to the documentation (https://typst.app/docs/).
Good tip thank you