Skip to content

Implementation of VoiceGist - A whatsapp voice message transcription service

Notifications You must be signed in to change notification settings

sebimarkgraf/whatsapp-voice-transcriber

Repository files navigation

image

VoiceGist - A WhatsApp Transcription Service

A simple project that creates a Twilio Whatsapp Bot to transcribe voice messages.

Setup

Dependencies are organized using PDM and a PyProject.toml

Technologies

Deployment

Setup a Twilio account and configure a Whatsapp Sandbox. This will give you all the Twilio settings. Next, setup a Cloudflare Account and create a Zero Trust tunnel for the URL where you set Twilio endpoint. If using the docker-copmose, you can point the tunnel locally to http://whatsapp-transcribe to connect the docker containers. Last create a random API key to protect your transcription endpoint from misuse.

Fill out the environment template using this information in a .env file:

TWILIO_ACCOUNT_SID=<Account Sid>
TWILIO_AUTH_TOKEN=<Auth Token>
TWILIO_PHONE_NUMBER=whatsapp:<twilio phone number>
TWILIO_WEBHOOK_URL=<Url confgiured in Twilio>
TUNNEL_TOKEN=<Cloud Flare Tunnel Token>
API_KEY=<Random API key e.g. (openssl rand -hex 32)>

TRANSCRIBE_MODEL=large # Whisper Model Size
SUMMARIZE_MODEL=qwen2:7b-instruct
OLLAMA_HOST=http://host.docker.internal:11434 # If running Ollama on Host

then run

docker-compose up -d

to start the deployment.

Twilio Limits

Limits for message sizes can be found here

Development

To start developing simply install the dependencies using PDM. For install PDM according to your operating system and then run

pdm install

which automatically installs package and development dependencies.

Then you can run the tests and create the docs with

make docs test

Tests

Currently, the tests require a working Ollama setup. If you don't have Ollama running please install it directly or using docker and adjust conftest.py to your environment.

About

Implementation of VoiceGist - A whatsapp voice message transcription service

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published