Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 1.32 KB

README.md

File metadata and controls

42 lines (34 loc) · 1.32 KB

cbot-telegram-whisper

Simple bot that transcribes Telegram voice messages using OpenAI's using CPU inference thanks to whisper.cpp

Built using:

How to build

You can check out the example Dockerfile, but TL;DR:

git clone git@github.com:chinese-soup/cbot-telegram-whisper.git && \
cd cbot-telegram-whisper && \
git clone https://github.com/ggerganov/whisper.cpp.git && \
cd whisper.cpp/bindings/go && \
make whisper && \
cd ../../.. && \
go get
C_INCLUDE_PATH=/app/whisper.cpp/ LIBRARY_PATH=/app/whisper.cpp/ go build -o whisperbot

Get a model, e.g.:

bash whisper.cpp/models/download-ggml-model.sh tiny.en

Check out whisper.cpp's README for more info.

Set the environment variables mentioned in .env.example, e.g.:

export TELEGRAM_APITOKEN=<your bot token here>
export MODELPATH=whisper.cpp/models/ggml-tiny.en.bin

And you're all set, run it:

./whisperbot