diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d2a83125..c93ea3af 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -30,12 +30,11 @@ archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of `uname`. name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ + {{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} + {{- if .Arm }}{{ .Arm }}{{ end }} # use zip for windows archives format_overrides: - goos: windows diff --git a/README.md b/README.md index 8d7c5002..6243761b 100644 --- a/README.md +++ b/README.md @@ -2,39 +2,44 @@ CLI tool for transcription +## Features -## Build Locally +- Transcribe audio and output to stdout/json (supports multiple file input) +- Helps with drafting captions for your editing workflow -1. Clone repository -2. Either run `go build` and then manually move the resulting binary into your `$PATH`, or just run `go install` to move the executable file to $GOPATH/bin -3. You're good to go! +### Prattl manages its own python distribution -## 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. +`prattl clean` will completely remove this distribution. -## Transcribing -Under the hood, prattl is using [distil-whisper](https://huggingface.co/distil-whisper/distil-large-v3), 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: +### Transcribing -`prattl transcribe ` +Under the hood, prattl is using [distil-whisper](https://huggingface.co/distil-whisper/distil-large-v3), 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: +```zsh +prattl transcribe +``` 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` +```zsh +prattl transcribe test1.mp3 test2.mp3 test3.mp3 +``` the output will be: + ```json { - "test1.mp3": "test1.mp3's transcription", - "test2.mp3": "test2.mp3's transcription", - "test3.mp3": "test3.mp3's transcription", + "test1.mp3": "test1.mp3's transcription", + "test2.mp3": "test2.mp3's transcription", + "test3.mp3": "test3.mp3's transcription" } ``` -### OS/CPU Architecture Support +## OS/CPU Architecture Support + - windows/386 - windows/amd64 - darwin/arm64 @@ -42,7 +47,46 @@ the output will be: - linux-gnu/arm64 - linux-gnu/amd64 -> **_NOTE:_** CUDA architecture GPUs can take advantage of GPU acceleration for transcription +> [!NOTE] +> CUDA architecture GPUs can take advantage of GPU acceleration for transcription + + + +## Prerequisites + +[go](https://go.dev/) installed and included in `$PATH` -### Prerequisites [ffmpeg](https://www.ffmpeg.org/) installed and included in `$PATH` + +## Build Locally + +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. You're good to go! + +## Usage + +Help with any prattl command + +```zsh +prattl help +``` + +Prepare the python distribution at `$HOME/.prattl` required by prattl + +```zsh +prattl prepare +``` + +Remove the python distribution built at `$HOME/.prattl` by prattl + +```zsh +prattl clean +``` + +Transcribe provided audio by pathname(s), output transcription to stdout/json + +```zsh +prattl transcribe +``` diff --git a/cmd/clean.go b/cmd/clean.go index b7ac09d3..561092f4 100644 --- a/cmd/clean.go +++ b/cmd/clean.go @@ -23,7 +23,7 @@ var cleanCommand = &cobra.Command{ Long: "This command removes everything prattl adds to your filesystem", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { - env, err := pysrc.GetPrattlEnv() + env, err := pysrc.PrattlEnv() if err != nil { return fmt.Errorf("Error getting prattl env: %v\n", err) }