https://github.com/ccoreilly/telegram-deepspeech-bot
A Telegram bot that infers text from voice notes using DeepSpeech
https://github.com/ccoreilly/telegram-deepspeech-bot
catalan deepspeech telegram telegram-bot
Last synced: about 1 year ago
JSON representation
A Telegram bot that infers text from voice notes using DeepSpeech
- Host: GitHub
- URL: https://github.com/ccoreilly/telegram-deepspeech-bot
- Owner: ccoreilly
- License: mit
- Created: 2020-05-20T21:57:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:57:10.000Z (over 3 years ago)
- Last Synced: 2025-02-10T04:17:45.969Z (over 1 year ago)
- Topics: catalan, deepspeech, telegram, telegram-bot
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DeepSpeech inference Telegram bot
A simple telegram bot that will convert a voice note to text using a [DeepSpeech](https://github.com/mozilla/DeepSpeech) model. Created to quickly test my [DeepSpeech Catalan model](https://github.com/ccoreilly/deepspeech-catala).
## 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](https://docs.docker.com/engine/reference/commandline/run/)):
```
$ docker run -v /path/to/my/model:/app/model -e TELEGRAM_TOKEN deepspeech-bot
```