Code Monkey home page Code Monkey logo

cog-whisper's Introduction

Whisper on Fly GPUs

Run OpenAI Whisper as a Replicate Cog on Fly.io!

cog

This app exposes the Whisper model via a simple HTTP server, thanks to Replicate Cog. Cog is an open-source tool that lets you package machine learning models in a standard, production-ready container. When you're up and running, you can trascribe audio using the /predictions endpoint.

Launch

Create a deploy the app in one single command:

fly launch --from https://github.com/fly-apps/cog-whisper --no-public-ips

Assign a Flycast IP to the app:

fly ips allocate-v6 --private

That's it! You can now access the app at http://<APP_NAME>.flycast/predictions

Important

By default, the app runs on Fly GPUs โ€” Nvidia L40s to be exact. This can be customized in the fly.toml vm settings. It will run on a standard Fly Machine โ€” but performance will be reduced.

Usage

curl -X PUT \
     -H "Content-Type: application/json" \
     -d '{
           "input": {
             "audio": "https://fly.storage.tigris.dev/cogs/bun_on_fly.mp3"
           }
         }' \
     http://cog-whisper.flycast/predictions/test | jq

Local Setup

  1. Clone the cog-whisper repository from GitHub:

    git clone [email protected]:fly-apps/cog-whisper.git
  2. Navigate into the cloned directory:

    cd cog-whisper
  3. Run locally. First, run get_weights.sh from the project root to download pre-trained weights, then build a container and run predictions:

    ./scripts/get_weights.sh:
    cog predict -i audio="<path/to/your/audio/file>"
  4. Build the Docker image using cog:

    cog build -t whisper

Having trouble?

Create an issue or ask a question here: https://community.fly.io/

cog-whisper's People

Contributors

guspan-tanadi avatar kylemclaren avatar rubys avatar

Stargazers

 avatar  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.