Skip to content

prattlOrg/prattl

Repository files navigation

prattl

CLI tool for transcription

Features

  • Transcribe audio and output to stdout in json format (supports multiple file input)
  • Helps with drafting captions for your editing workflow

Prattl manages its own python distribution

When you run prattl prepare prattl installs a python distribution specific to your OS to your system, This means you don't need to manage Python dependencies or risk corrupting your existing environments. prattl clean will completely remove this distribution.

Transcribing

Under the hood, prattl is using distil-whisper, which runs locally on your system. The better your GPU, the faster the transcription, if you do not have a GPU, it will use your CPU. To create a transcription, use the command:

prattl transcribe <filepath/to/audio.mp3>

You can provide multiple file paths, and prattl will transcribe all of them as a single batch. This means the efficiency increases with more files!

Upon completion, the output will be a JSON object. For instance, if you run:

prattl transcribe test1.mp3 test2.mp3 test3.mp3

the output will be:

{
  "test1.mp3": "test1.mp3's transcription",
  "test2.mp3": "test2.mp3's transcription",
  "test3.mp3": "test3.mp3's transcription"
}

OS/CPU Architecture Support

  • windows/386
  • windows/amd64
  • darwin/arm64
  • darwin/amd64
  • linux-gnu/arm64
  • linux-gnu/amd64

Note

CUDA architecture GPUs can take advantage of GPU acceleration for transcription

Installation

Prerequisites

ffmpeg installed and included in $PATH

Get Started

  1. Download (or build) binary to chosen location
  2. Include the path of the binary in $PATH
  3. Run prattl prepare to install necessary python dependencies to $HOME/.prattl directory
  4. Prattl is ready to be used!

Build Locally

Prerequisites

go installed and included in $PATH

ffmpeg installed and included in $PATH

Get Started

  1. Clone repository
  2. cd into the cloned repository
  3. Either run go build and then manually move the resulting binary into your $PATH, or just run go install to install the executable file to $GOPATH/bin
  4. Run prattl prepare to install necessary python dependencies to $HOME/.prattl directory
  5. You're good to go!

Usage

Help with any prattl command

prattl help

Prepare the python distribution at $HOME/.prattl required by prattl

prattl prepare

Remove the python distribution built at $HOME/.prattl by prattl

prattl clean

Transcribe provided audio by pathname(s), output transcription to stdout/json

prattl transcribe <filepath/to/audio.mp3> <filepath/to/second_audio.mp3>