编辑字幕
正确
🌐 Correct
如果人工智能在字幕中犯了错误,有三种不同的方法可以纠正它们:
🌐 If the AI has made a mistake in the caption, there are three different ways to correct them:
在 Remotion Studio 内,你可以通过点击视频中有错误的字幕来进行修改。这会打开一个包含字幕的文本编辑器,你可以直接在其中进行编辑。完成修改后,点击编辑器右下角的“完成”。这将把你所做的更改保存到包含字幕的 JSON 文件中。你可以使用你选择的编辑器直接编辑项目中位于
public/[your-composition-id]
的 JSON 文件。
如果 AI 多次犯同样的错误,你也可以通过在
config/autocorrect.ts 文件中,向 autocorrectWord 函数添加逻辑来以编程方式重新映射单词。例如:
const autocorrectWord = (word: Word): Word => {
// Replace a single word with another one
if (word.word === " github") {
return {
...word,
word: word.word.replace("github", " GitHub"),
};
}
return word;
};高亮单词
🌐 Highlight Words
要高亮特定单词,请在字幕中点击所需的单词。在打开的编辑器中,选择 monospace 选项,以将所选单词应用等宽字体和默认蓝色。
如果你希望更改高亮的颜色,请修改 config/themes.ts 文件中的 WORD_HIGHLIGHT_COLOR 常量。
🌐 To highlight specific words, click on the desired word within the captions. In the opening editor, choose the monospace option to apply a monospaced font and default blue color to the selected word.
If you wish to change the highlighting color, modify the WORD_HIGHLIGHT_COLOR constant in the config/themes.ts file.