-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
155 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| eval "$(lorri direnv)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,4 @@ | |
| go.work | ||
|
|
||
| *.pem | ||
| .dg-api-key | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,37 @@ | ||
| # mumble-whisper-go | ||
| OpenAI whisper transcription bot for Mumble. | ||
| # ~~mumble-whisper-go~~ | ||
| # mumble-deepgram-go | ||
| ~~OpenAI Whisper~~ [Deepgram](https://deepgram.com) transcription bot for Mumble. | ||
|
|
||
| ## reqs | ||
|
|
||
| - [`whisper.cpp`](https://github.com/ggerganov/whisper.cpp/) (i'm on `ac521a566ea6a79ba968c30101140db9f65d187b "ggml : simplify the SIMD code (#324)"`) | ||
| - go (i'm on 1.19.3) | ||
| - an account on deepgram and an API key from it | ||
| - go (i'm on 1.19.4) | ||
| - openssl | ||
| - (see `go.mod`) | ||
|
|
||
| ## get started | ||
|
|
||
| ``` shellsession | ||
| # (NixOS: Whisper dependency config) | ||
| nix-shell -p | ||
| export NIX_LDFLAGS="${NIX_LDFLAGS}-L /home/ckie/git/whisper.cpp -rpath /home/ckie/git/whisper.cpp" | ||
| export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE}-I /home/ckie/git/whisper.cpp" | ||
| # (Generate cert) | ||
| $ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes | ||
| # (Run) | ||
| $ go mod download | ||
| $ go run main.go | ||
| $ go run main.go -server mumble.cyberia.club:64738 -certificate cert.pem -key key.pem -insecure -username $USER-bot -apikey $(cat .dg-api-key) | ||
| # (✨) | ||
| ``` | ||
|
|
||
| ## nix | ||
| if you're using nix, you can enable the glorious direnv (perhaps in your home-manager config!) | ||
| along with lorri, run `direnv allow` and your direnv-compatible editor should pick up on the env | ||
| changes and use the gopls binary specified in `shell.nix` -- it also puts openssl and go in PATH. | ||
|
|
||
| ## why didn't you like whisper | ||
|
|
||
| i did kinda like it but there's a bunch of post-processing to do and whisper.cpp | ||
| runs on CPU-only, 4 threads or something. | ||
|
|
||
| i saw deepgram on a [zack freedman](https://www.youtube.com/@ZackFreedman/videos) youtube video | ||
| and the thing just fucking works except for little-endian u16s being a weird choice. | ||
|
|
||
| i hope soon enough we'll have something that fits nicely on a raspi and can do all the things with like, 40% resource util. | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { pkgs ? import <nixpkgs> {} }: | ||
|
|
||
| with pkgs; | ||
|
|
||
| mkShell { | ||
| buildInputs = [ | ||
| gopls | ||
| go | ||
| openssl | ||
| ]; | ||
| } |