Skip to main content

生成字幕

为了生成字幕,Remotion Recorder 使用 Whisper.cpp 进行快速且准确的转录。每次使用 Remotion Recorder 录制片段时,字幕会自动生成并保存在与录制文件相同的文件夹中。

🌐 To generate captions, the Remotion Recorder uses Whisper.cpp for fast and accurate transcriptions. Each time you record a clip with the Remotion Recorder, captions are automatically generated and persisted to same folder as your recordings.

安装 Whisper.cpp

🌐 Installing Whisper.cpp

当你第一次完成录制片段时,Whisper.cpp 和一个 1.5GB 的模型将会被安装到你的电脑上。这可能需要几分钟时间。 安装完成后,将为 webcam 片段生成字幕。

🌐 The very first time you finish recording a clip, Whisper.cpp and a 1.5GB model will be installed on your computer. This may take a few minutes. Once installed, captions for the webcam clip will be generated.

note

字幕仅为带有 webcam 前缀的文件生成。

进行更正

🌐 Make corrections

如果 AI 出了错,没问题,有多种方法可以手动纠正转录。点击这里查看操作方法

🌐 If the AI has made a mistake, no problem, there are various ways to correct the transcriptions manually. See here how to do this.

通过 CLI 生成字幕

🌐 Generate captions via CLI

对于外部录音,你也可以通过命令行生成字幕。

🌐 For external recordings, you can also generate captions via the CLI.

bun sub.ts

请注意,你想要转录的文件名需要以前缀 webcam 开头,所有其他文件将被忽略。包含字幕的 JSON 文件将被生成并保存在 public/<composition-id>/sub[timestamp].json 下。

非英语语言

🌐 Non-english languages

如果你不使用英语记录,请编辑 config/whisper.ts 文件。

🌐 If you do not record in English, edit the config/whisper.ts file.

将语言设置为支持的值,将model更改为不以.en结尾的支持的值。 建议如果你正在转录非英语语言,请选择更大的模型。

🌐 Set the language to a supported value change change the model to a supported value that does not end in .en.
It is advised to choose a larger model if you are transcribing in a non-english language.