Skip to content

thomasbrq/scribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scribe

The aim of the project is to transcribe audios via a Telegram bot.

gif

Source audio

Dependencies

Setup

Install Python 3.10 and ffmpeg on your machine.

Python

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

Telegram

  • 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.

VOSK

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.

Environments variables

Create a .env file in the root folder and write this

API_KEY=<YOUR_TELEGRAM_BOT_API_KEY>

How to use

Run

python3 src/transcribe.py

and send an audio file to your bot and he will reply with the transcript.