Giter Site home page Giter Site logo

audio-video-transcriber's Introduction

Audio-Video-Transcriber

Whisper-cpu

This repository offers a way to transcribe media files on cpu using distil-whisper and faster-whisper. Files can be found online (e.g. a youtube video, paste its url on the app, or uploaded from local).

Installation

  • Ensure to install ffmpeg binary
  • clone this repo
  • run pip install -r requirements.txt
    • run pip install gradio ; it is not included in requirements.txt due to a dependency conflict with yt-dlp and gradio (websockets version)
  • first clone bofenghuang/whisper-large-v3-french-distil-dec16 at root level of this repository, using python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='bofenghuang/whisper-large-v3-french-distil-dec16', local_dir='./models/whisper-large-v3-french-distil-dec16', allow_patterns='ctranslate2/*')"
  • go to models/ ; clone this two repositories: Systran/faster-distil-whisper-large-v2, Systran/faster-whisper-large-v2
  • you can run the unit tests by moving to tests folder and using python -m unittest tests -v
  • run the app using python whisper_cpu/app.py

Docker

You can perform an install by building a docker image :

  • clone this repo
  • build the image
  • run the container. Make sure to redirect the port 7860 of the container to a port on your local machine.

No need to download the models, they will be downloaded during the image building process.

Models

  • faster-distil-whisper-large-v2 : a distilled model of whisper-v3 for English
  • bofenghuang/whisper-large-v3-french-distil-dec16 : a distilled model of whisper-v3 for French
  • faster-whisper-large-v2 : a multilingual model. Slower than the above models.

v3 versions of Whisper are more prone to hallucination than v2, that’s why I choose to use the latter when they are available.

Notebook

This repository also contains a notebook, and must be used with a GPU for performance. A colab GPU is enough. It uses whisper3 and gradio. To run it, you can:

  • Import the notebook on a google colab instance
  • Activate the GPU
  • Run all the cells
  • Scroll to the last cell and wait until a visual interface appears
  • Use the app

Features:

  • Youtube video transcripter: Transcribe the content of a

youtube video to a text file, one sentence per line separated by an empty new line or a srt file with timestamps.

  • Local audio/video file transcripter: Same as the youtube video transcripter, but for your local

audio/video files.

  • Chunk reorder: After reviewing a srt file, assign

an unique number to each chun to get them ordered.

audio-video-transcriber's People

Contributors

chnkvn avatar

Watchers

 avatar

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.