buzz - 基于 whisper 的语音识别客户端(支持macOS、windows、Ubuntu

本文翻译转载自:https://github.com/chidiwilliams/buzz



Buzz transcribes and translates audio offline on your personal computer. Powered by OpenAI’s Whisper.


Features


安装

给你的系统下载最新版本的 Buzz : https://github.com/chidiwilliams/buzz/releases/latest
Buzz 可以安装在 Mac, Windows, and Linux.

Mac (macOS 11.7 and later)

方式一:使用 brew

  brew install --cask buzz

方式二:下载 Buzz-x.y.z.dmg 文件。


Windows
适用于 Windows 10 and later

下载运行 Buzz-x.y.z.exe 文件.


Linux
适用于 Ubuntu 20.04 and later

  • 安装依赖:
  sudo apt-get install libportaudio2
  • 下载和提取 Buzz-x.y.z-unix.tar.gz 文件

如何使用

1、实时录制

To start a live recording:

  • Select a recording task, language, quality, and microphone.
  • Click Record.

Note: Transcribing audio using the default Whisper model is resource-intensive. If your computer is unable to keep up with real-time transcription, consider turning on GGML inference.

FieldOptionsDefaultDescription
Task“Transcribe”, “Translate”“Transcribe”“Transcribe” converts the input audio into text in the selected language, while “Translate” converts it into text in English.
LanguageSee Whisper’s documentationfor the full list of supported languages“Detect Language”“Detect Language” will try to detect the spoken language in the audio based on the first few seconds. However, selecting a language is recommended (if known) as it will improve transcription quality in many cases.
Quality“Very Low”, “Low”, “Medium”, “High”“Very Low”The transcription quality determines the Whisper model used for transcription. “Very Low” uses the “tiny” model; “Low” uses the “base” model; “Medium” uses the “small” model; and “High” uses the “medium” model. The larger models produce higher-quality transcriptions, but require more system resources. See Whisper’s documentation for more information about the models.
Microphone[Available system microphones][Default system microphone]Microphone for recording input audio.

在这里插入图片描述


2、录制电脑音频

要录制计算机上应用程序播放的音频,您可以安装音频环回驱动程序(一种可以创建虚拟音频设备的程序)。
本指南的其余部分将在Mac上使用 BlackHole,但您可以为您的操作系统使用其他替代方案(请参阅LoopBeAudio、LoopBack和虚拟音频线)。


1、使用brew 安装BlackHole
BlackHole via Homebrew :
https://github.com/ExistentialAudio/BlackHole#option-2-install-via-homebrew

brew install blackhole-2ch

2、打开 Audio MIDI Setup
位于 /Applications/Utilities/Audio Midi Setup.app

在这里插入图片描述


3、点击左下角 + 图标,选择 Create Multi-Output Device.

在这里插入图片描述


4、添加默认的 speaker 和 BlackHole 到多输出设备(multi-output device.)

在这里插入图片描述


5、选择此多输出设备作为扬声器(应用程序或系统范围),以便在BlackHole中播放音频。

6、 打开Buzz,选择BlackHole作为麦克风,然后像以前一样录制,以查看通过BlackHole播放的音频的 transcriptions。


导入文件

  • Click Import Media File on the File menu (or the ‘+’ icon on the toolbar, or Command/Ctrl + O).
  • 单击“文件”菜单上的“导入媒体文件”(或工具栏上的“+”图标,或快捷键:Command/Ctrl + O)。
  • 选择文件
  • 选择任务、语言和模型设置
  • 点击运行
  • 当转录状态显示“已完成”时,双击行(或选择行并单击 图标)打开转录。

FieldOptionsDefaultDescription
Export As“TXT”, “SRT”, “VTT”“TXT”Export file format
Word-Level TimingsOff / OnOffIf checked, the transcription will generate a separate subtitle line for each word in the audio. Enabled only when “Export As” is set to “SRT” or “VTT”.

查看 Live Recording section 来获取更多关于 task, language 和 quality 设置的信息。
Live Recording section : https://github.com/chidiwilliams/buzz#live-recording


从源码编译

1、安装依赖:Poetry
https://python-poetry.org/docs/#installing-with-the-official-installer

2、下载 repository

git clone --recurse-submodules https://github.com/chidiwilliams/buzz

3、安装项目依赖

poetry install

4、(可选) 使用 Whisper.cpp 推理,运行:

make buzz/whisper_cpp.py 

5、(可选) 要编译翻译,运行:

make translation_mo

6、最后,运行应用程序

poetry run python main.py

或者使用下述代码编译

poetry run pyinstaller --noconfirm Buzz.spec

FAQ

1、模型保存地址: ~/.cache/whisper

Whisper.cpp 模型存储地址:

  • macOS : ~/Library/Caches/Buzz
  • Unix : ~/.cache/Buzz
  • Windows : C:\Users\<username>\AppData\Local\Buzz\Buzz\Cache

2、如果转录运行太慢,可以使用小一点的额 Whisper模型,或者使用 Whisper.cpp 模型。


2023-03-21

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值