The aim of the project is to transcribe audios via a Telegram bot.
Install Python 3.10 and ffmpeg on your machine.
Create a Python virtual environment
python3 -m venv .venv
and activate it
# on Linux/MacOS
source .venv/bin/activate
# on Windows:
.venv\Scripts\activate
Install the Python dependencies
python3 -m pip install -r requirements.txt
- Connect with BotFather on Telegram.
- Select the "New Bot" option to start creating your new bot or type
/newbot
. - Provide a bot name
- Then
BotFather
will send you a token. Keep it safe, we'll need it later.
Scribe uses VOSK, a speech recognition toolkit. It works offline and the models are lightweight.
- Download a model, I personnally use
vosk-model-en-us-daanzu-20200905
- Unzip the archive in the root folder and rename it
model
.
Create a .env
file in the root folder and write this
API_KEY=<YOUR_TELEGRAM_BOT_API_KEY>
Run
python3 src/transcribe.py
and send an audio file to your bot and he will reply with the transcript.