AI Personal Learning
and practical guidance
豆包Marscode1

TRV: Rapidly Generate Presentation Videos from Slides/PPTs and Explanatory Notes

General Introduction

TRV is an open source tool, hosted on GitHub, designed to help users quickly convert slides and lecture notes into videos with narration. It automatically generates audio and video content from incoming presentation files through simple command line operations and is suitable for educators, content creators or developers who need to quickly create presentation videos. Developed by the transformrs team, the project supports a wide range of audio generation models and formats, and is available to users via local deployment or online services. TRV was designed with efficiency and flexibility in mind, and the open-source nature of the project gives tech enthusiasts the freedom to customize and extend the functionality.

TRV:将幻灯片/PPT和讲解备注快速生成演讲视频-1


 

Function List

  • Slide to Video: Convert Typst-formatted slide files to video with narration.
  • Automatic Audio Generation: Text-based speech generation with support for multiple speech models and styles.
  • Multi-format support: The output audio supports WAV and other formats, and the video supports MP4.
  • Multiple Service Provider Compatibility: Connects to services such as OpenAI, DeepInfra, and more to generate audio.
  • Customized Configuration: Support for adjusting resolution, voice style and other parameters.
  • Docker Support: Provides Docker images for rapid local deployment.
  • Vertical and Horizontal Screen Adaptation: Support for generating vertical videos suitable for platforms such as YouTube Shorts.

 

Using Help

Installation process

TRV is a command line tool that requires some technical skills to install and use. The following are the detailed installation steps:

1. Pre-conditions

  • system requirements: Support for macOS, Linux or Windows (command line environment required).
  • Dependent tools::
    • Git: Used to clone code repositories.
    • Docker (optional): for containerized deployment.
    • Python (optional): if you install some of the dependencies manually.
  • network connection: Some features require access to online services.

2. Getting the source code via GitHub

  1. Open a terminal and enter the following command to clone the repository:
git clone https://github.com/transformrs/trv.git
  1. Go to the project catalog:
cd trv

3. Selection of mounting method

  • Way 1: Use Docker (recommended)
  1. Make sure Docker is installed and running.
  2. Build the Docker image:
docker build --rm -t trv .
  1. Run the container:
docker run -it --rm trv
  1. The TRV command is available inside the container.
  • Mode 2: Manual installation (local environment)
  1. Install necessary dependencies (e.g. FFmpeg, Typst, etc. depending on the system).
  2. Configure environment variables and tools according to the instructions on the GitHub page.
  3. Run the TRV executable directly (compilation or download of a pre-built version is required).

4. Configure service key (optional)

If you are using DeepInfra or another online service to generate audio, you need to configure the API key:

  1. Get the key (e.g., DeepInfra's DEEPINFRA_KEY).
  2. Set environment variables in the terminal:
export DEEPINFRA_KEY="你的密钥"

Usage

The core function of TRV is to convert slide files to video, and the following is the specific operation procedure:

1. Preparation of input documents

  • Create a demo file in Typst format (e.g. presentation.typ), containing slide content and presentation notes.
  • Example file contents:
#slide[
#title[欢迎使用 TRV]
这是一个简单的演示。
]
#notes[这是一个简单的演示,欢迎体验 TRV 的自动化功能。]

2. Video generation

  • basic command::
trv --input=presentation.typ --output=out.mp4

This will generate a video file with the default configuration out.mp4The

  • Use of online services::
trv --input=presentation.typ --provider=openai-compatible(kokoros.transformrs.org) --model=tts-1 --voice=bm_lewis --audio-format=wav

Use the Kokoros service to generate WAV audio and synthesize video.

  • Using DeepInfra::
trv --input=presentation.typ --model=Zyphra/Zonos-v0.1-hybrid --voice=american_male

You need to make sure that you have set the DEEPINFRA_KEYThe

3. Customized settings

  • Adjustment of resolution::
    For vertical screen videos (e.g. YouTube Shorts), this can be set:
trv --input=presentation.typ --page=1080x1920
  • Selecting a voice style::
    indicate clearly and with certainty --voice parameters, such as american_male maybe bm_lewisDepending on the service support.

4. Viewing the output

  • The generated video is saved by default in the _out/out.mp4(Paths can be accessed through the --output (Designation).
  • Check the log messages to ensure that the audio and video clips for each slide are generated without error.

Featured Function Operation

Automatic Audio Generation

  1. Write notes for a presentation and TRV will generate speech from the notes.
  2. pass (a bill or inspection etc) --model Specify the speech model (e.g. tts-1), by --voice Select the tone.
  3. Example:
trv --input=presentation.typ --model=tts-1 --voice=bm_lewis

output band bm_lewis Tone of voice-over video.

Docker running locally

  1. Runs inside a Docker container:
docker run -it --rm -v $(pwd):/data trv --input=/data/presentation.typ
  1. -v parameter mounts the local directory to ensure that the files are accessible.

Vertical screen video production

  1. Set the page size to 1080x1920:
trv --input=presentation.typ --page=1080x1920
  1. Output MP4 files suitable for short video platforms.

caveat

  • file format: The input should be a Typst file, if you are not familiar with Typst, please refer to the official documentation.
  • network dependency: The online service requires a stable network, and it is recommended to use Docker for local testing.
  • hardware requirement: If you are using an advanced model (such as Zyphra Zonos), 8GB of VRAM or a cloud service is recommended.

With the above steps, users can quickly get started with TRV, transforming slides into professional videos and improving the efficiency of content creation.

May not be reproduced without permission:Chief AI Sharing Circle " TRV: Rapidly Generate Presentation Videos from Slides/PPTs and Explanatory Notes
en_USEnglish