ccoreilly / telegram-deepspeech-bot

A Telegram bot that infers text from voice notes using DeepSpeech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DeepSpeech inference Telegram bot

A simple telegram bot that will convert a voice note to text using a DeepSpeech model. Created to quickly test my DeepSpeech Catalan model.

Configuration

The following environment variables allow configuring the bot:

Variable Description Default
TELEGRAM_TOKEN The unique token of your bot None
MODEL_PATH The path to the DeepSpeech model ./model/model.pbmm
SCORER_PATH The path to the KenLM scorer ./model/kenlm.scorer

Usage

Install the requirements

$ pip install -r requirements.txt

and start the bot

$ python deepspeech-bot.py

Usage with Docker

Build the docker image

$ docker build -f Dockerfile -t deepspeech-bot .

Run the docker image. You can specify a volume and environment variables (please refer to the docker run documentation):

$ docker run -v /path/to/my/model:/app/model -e TELEGRAM_TOKEN deepspeech-bot

About

A Telegram bot that infers text from voice notes using DeepSpeech

License:MIT License


Languages

Language:Python 89.2%Language:Dockerfile 10.8%