Live Captions：Linux 上的开源视频字幕应用
字幕
![](/data/attachment/album/202302/19/105843wbyojjof4yypyo6b.jpg)



> 
> Live Captions 是一个用于 Linux 桌面的应用程序，为视频提供即时、本地和开源的字幕。
> 
> 
> 


在一个完美的世界里，所有的视频都会有文字说明，直播视频也会有字幕。这不仅是没有听力的人能够参与流行文化和视频聊天的要求，对于有听力的人来说，这也是一种奢侈，他们只是喜欢阅读所说的内容。但并不是所有的软件都有内置的字幕，有些软件是依靠第三方的云服务来实现的。[Live Captions](https://github.com/abb128/LiveCaptions) 是 Linux 桌面上的一个应用，为视频提供即时、本地和开源的字幕。


### 安装 Live Captions


你可以通过 [Flatpak](https://opensource.com/article/21/11/install-flatpak-linux) 安装 Live Captions。


如果你的 Linux 发行版没有附带软件中心，请从终端手动安装它。首先，添加 [Flathub](https://flathub.org/apps/details/net.sapples.LiveCaptions) 仓库：



```
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

```

接下来，安装应用：



```
$ flatpak install flathub net.sapples.LiveCaptions

```

### 启动 Live Captions


要启动 Live Captions，从你的应用菜单中启动它。


或者，你也可以使用 `flatpak` 命令从终端启动它：



```
$ flatpak run net.sapples.LiveCaptions

```

你也可以使用类似 [Fuzzpak](https://www.redhat.com/sysadmin/launch-flatpaks-terminal-fuzzpak) 的命令：



```
$ fuzzpak LiveCaptions

```

当 Live Captions 首次启动时，你会看到一个配置页面：


![preferences in Live Captions.](/data/attachment/album/202302/19/105924bdacjawgykzjyllk.jpg)


你可以设置字体、字体大小、颜色等。默认情况下，Live Captions 不是完全确定的文本会以更深的颜色呈现（LCTT 校注：因为有些语音识别结果不能确保完全正确）。如果你使用实时字幕是为了方便，这可能没有必要，但如果你听不到视频的声音，那么知道哪些文本可能不正确是有用的。


你可以随时返回偏好页面，所以你的选择不一定是最终的。


### 使用 Live Captions


当 Live Captions 开始运行，任何通过系统声音传来的英语单词都会被打印到 Live Captions 窗口中。


这不是一项云服务。不需要 API 密钥。没有遥测或间谍活动，也没有数据收集。事实上，它甚至不需要网络权限。Live Captions 是开源的，所以没有使用专有的服务或库。


要改变声音输入，请点击 Live Captions 窗口左上方的麦克风图标。要打开 “<ruby> 偏好 <rt>  Preferences </rt></ruby>” 窗口，请点击 Live Captions 窗口左下方的齿轮图标。


### 开放访问


根据我的经验，Live Captions 的结果是好的。它们并不完美，但在小型的 [Jitsi 视频通话](https://opensource.com/article/21/9/alternatives-zoom)中，它很出色。即使是小众的视频（例如 Warhammer 40K 的激烈比赛），它也做得出奇地好，只在最虚构的科幻术语上磕磕碰碰。


让开源代码易于访问是至关重要的，最终它有可能使每个人受益。我个人不需要 Live Captions，但当我不想听视频的时候，我喜欢使用它。当我希望得到帮助以专注于我可能会分心的事情时，我也会使用它。Live Captions 不仅仅是一个有趣的开源项目，它也是一个重要的项目。




---


via: <https://opensource.com/article/23/2/live-captions-linux>


作者：[Seth Kenlon](https://opensource.com/users/seth) 选题：[lkxed](https://github.com/lkxed) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
In a perfect world, all videos would have transcripts, and live videos would have captioning. It's not just a requirement for people without hearing to be able to participate in pop culture and video chats, it's a luxury for people with hearing who just prefer to read what's been said. Not all software has captioning built-in though, and some that does relies on third-party cloud services to function. [Live Captions](https://github.com/abb128/LiveCaptions) is an application for the Linux desktop that provides instant, local, and open source captioning for video.

## Install Live Captions

You can install Live Captions as a [Flatpak](https://opensource.com/article/21/11/install-flatpak-linux).

If your Linux distribution doesn't ship with a software center, install it manually from a terminal. First, add the [Flathub](https://flathub.org/apps/details/net.sapples.LiveCaptions) repository:

```
``````
$ flatpak remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
```


Next, install the application:

```
````$ flatpak install flathub net.sapples.LiveCaptions`


## Launch Live Captions

To start Live Captions, launch it from your application menu.

Alternatively, you can start it from a terminal using the `flatpak`

command:

```
````$ flatpak run net.sapples.LiveCaptions`


You can also use a command like [Fuzzpak](https://www.redhat.com/sysadmin/launch-flatpaks-terminal-fuzzpak):

```
````$ fuzzpak LiveCaptions`


When Live Captions first starts, you're presented with a configuration screen.

![Image showing preferences in Live Captions.](https://opensource.com/sites/default/files/2023-01/live-caption-preferences.png)

(Seth Kenlon, CC BY-SA 4.0)

You can set the font, font size, colors, and more. By default, text that Live Captions isn't 100% confident about is presented in a darker color than your chosen font color. If you're using Live Captions as a convenience, this probably isn't necessary, but if you can't hear the video, then it's good to get an idea of words that may not be correct.

You can return to the preferences screen anytime, so your choices don't have to be final.

## Using Live Captions

Once Live Captions is running, any English words coming through your system sound are printed to the Live Captions window.

![Image showing Live Captions presenting text from a Jitsi call. ](https://opensource.com/sites/default/files/2023-01/Livecaptions%20onJitsiCall.png)

(Seth Kenlon, CC BY-SA 4.0)


This isn't a cloud service. There are no API keys required. There's no telemetry or spying and no data collection. In fact, it doesn't even require network permissions. Live Captions is open source, so there are no proprietary services or libraries in use.

To change the sound input, click the **Microphone** icon in the top left of the **Live Captions** window. To open the **Preferences** window, click on the **Gear** icon in the bottom left of the **Live **Captions window.

## Open access

In my experience, the results of Live Captions are good. They're not perfect, but in small [Jitsi video calls](https://opensource.com/article/21/9/alternatives-zoom), it's excellent. Even with niche videos (rowdy tournaments of Warhammer 40,000, for instance) it does surprisingly well, stumbling over only the most fictional of sci-fi terminology.

Making open source accessible is vital, and in the end it has the potential to benefit everyone. I don't personally require Live Captions, but I enjoy using it when I don't feel like listening to a video. I also use it when I want help to focus on something that I might otherwise be distracted away from. Live Captions isn't just a fun open source project, it's an important one.

## 2 Comments