Giter Site home page Giter Site logo

bbc-esq / ctranslate2-faster-whisper-transcriber Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 0.0 175 KB

Record audio and save a transcription to your system's clipboard with ctranslate2 and faster-whisper.

Python 100.00%
audio-recorder audio-transcribing audio-transcription ctranslate2 faster-whisper transcribe transcriber

ctranslate2-faster-whisper-transcriber's Introduction

Record and Transcribe Audio Using Ctranslate2!

Record audio and save a transcription to your system's clipboard with ctranslate2 and faster-whisper.

Prerequisites

  1. Python 3.10 or 3.11.
  2. Git
  3. git-lfs

Obtain Repository

Download the latest release and unzip the files to your chosen directory.

Setup

Navigate to the folder containing ct2_main.py, open a command prompt, and create a virtual environment:

python -m venv .
.\Scripts\activate

‼️On Linux and MacOS run: source bin/activate

python -m pip3 install --upgrade pip

Install Platform-Specific Libraries

  • Linux
sudo apt-get install python3-dev
sudo apt-get install portaudio19-dev
  • MacOS
brew install portaudio

Install Dependencies

pip3 install -r requirements.txt

Install Faster-Whisper

pip3 install faster-whisper==0.10.1

Nvidia GPU support

Only systems with GPU acceleration need to follow this step:

Go here for instructions on how to get the "cublas" and "cudnn" libraries and place them in the directory.
Alternatively, you can go here.

Usage

Within the virtual environment run this command:

python ct2_main.py

‼️ If you receive an error something similar to this qt.qpa.plugin: Could not load the Qt platform plugin "xcb" please check here for a possible solution..

EXAMPLE COMMANDS

image

The first time using the program, click "Update Settings" button to download the model. After that, you can change the model and quantization (and device) by simply changing the settings and clicking "Update Settings" again.

Click start recording, speak, then stop recording. Then just use control + v or right click "paste" the transcription into wherever you want; for example, into the chat box for your LLM!

Remember, anytime you want to restart the program, make sure to activate the virtual environment first!

ctranslate2-faster-whisper-transcriber's People

Contributors

bbc-esq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ctranslate2-faster-whisper-transcriber's Issues

Models don't always change after updating.

After changing models and clicking the update button (sweet feature btw), on MX Linux 23.2 it appears to stay on the previous model, which is especially obvious when switching between medium and small or base.

Restarting the program seems to solve the problem though, so good for now.

Love the app btw.

Paste output duplicates and has inconsistencies

Using MX Linux 23.2 the paste results seem to duplicate a random amount. See my test results below trying the medium.en, small.en, and base.en models:

Where does sunshine come from?
Where does sunshine come from?
Where does sunshine come from?
Where does sunshine come from?
Where does sunshine come from?
Where does sunshine come from?
Where does sunshine come from?

Tell me about the complexities of quantum physics.

Tell me about the complexities of quantum physics.

Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.
Tell me where you're at right now.

Hello, can I help you?
Hello, can I help you?
Hello, can I help you?

Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?
Where do blue lights go at night?

Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me how long it takes to get to New York City. Tell me

What can we do for you today, mister?
What can we do for you today, mister?
What can we do for you today, mister?

Could not load the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" even though it was found.

I'm on PopOS based on Ubuntu 22.04. Been getting the below error after running 'python ct2_main.py', no matter what solution I try. Any idea how to resolve this? Google and ChatGPT have not been helpful? Thanks in advance.

Updated cpu quantizations in config.yaml to: ['float32', 'int8_float32', 'int8']
Updated cuda quantizations in config.yaml to: ['float32', 'int8_float32', 'float16', 'int8_float16', 'int8']
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vnc, offscreen, wayland-egl, minimalegl, linuxfb, vkkhrdisplay, wayland, minimal, eglfs, xcb.

Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.