TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: trv. A tool to turn a presentation and speaker notes into a video

3 pointsby huijzer3 months ago
Videos can be very effective in teaching, but I myself never make them because I don&#x27;t like narrating videos nor video editing. So that got me thinking whether text-to-speech can be used to generate videos automatically. That&#x27;s what I hacked together now in the `trv` Rust crate (it&#x27;s a binary that you can install via cargo install, see <a href="https:&#x2F;&#x2F;github.com&#x2F;transformrs&#x2F;trv">https:&#x2F;&#x2F;github.com&#x2F;transformrs&#x2F;trv</a> for the source code and docs).<p>It&#x27;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.<p>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: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;vn8-Asioxq8" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;vn8-Asioxq8</a>.<p>To give an idea of how the video was made, here is the first slide of the Typst presentation:<p><pre><code> #import &quot;@preview&#x2F;polylux:0.4.0&quot;: * #set page(paper: &quot;presentation-16-9&quot;, 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] ``` ] </code></pre> Next, I ran the following command:<p><pre><code> $ trv --input=presentation.typ \ --model=&#x27;hexgrad&#x2F;Kokoro-82M&#x27; \ --voice=&#x27;am_liam&#x27; \ --release&quot; </code></pre> This created a video of 1.2 MB that I then uploaded to YouTube.<p>Is a tool like this useful? What are your thoughts?

1 comment

zahlman3 months ago
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&#x27;m sure.<p>It might be a good idea to link &quot;Typst&quot; in the README to the documentation (<a href="https:&#x2F;&#x2F;typst.app&#x2F;docs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;typst.app&#x2F;docs&#x2F;</a>).
评论 #43153252 未加载