A Telegram mini app for transcribing and synthesizing speech messages using Whisper and Coqui TTS, delivered through a clean Flutter web interface. (based on this previous project - Speech Transcriber & Synthesizer App)
- 🎤 Accepts media files via a Telegram mini app
- ✍️ Transcribes speech to text using OpenAI Whisper
- 🔊 Generates speech responses using Coqui TTS
- 🌍 Supports multiple languages
- 💬 Works directly inside Telegram Web as a Mini App
- 📦 Easily deployable using
Docker+ngrok
- Backend: Python, Sanic, Whisper, Coqui TTS
- Frontend: Flutter Web
- Bot API Integration: Telegram Bot API
- Hosting: Docker + Docker Compose + Ngrok
- Web Server: Nginx (templated config with CORS)
- Git
- Docker
- Docker Compose
- Ngrok account
- Telegram Account
- Telegram Bot (via BotFather)
-
Clone the repo:
git clone https://github.com/PhillMckinnon/TG_WebApp_Flutter_WCTTS cd TG_WebApp_Flutter_WCTTS -
Configure ngrok (
ngrok.yml):tunnels: web: proto: http addr: 8080 host_header: rewrite
-
Set your environment variables (
.env):COQUI_TOS_AGREED=1 PORT=5000 TELEGRAM_BOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN MAX_DAILY_LIMIT=3 NGROK_ORIGIN=https://<your-subdomain>.ngrok-free.app DURATION=360 MAX_SIZE=20
-
Start the services:
docker-compose build docker-compose up
-
Expose the app via ngrok:
ngrok http 8080 --host-header=rewrite
-
Set up Telegram Mini App in BotFather:
- Set up the mini app URL
- Paste your
NGROK_ORIGIN(e.g.https://yourname.ngrok-free.app) - Optional:
/setmenubuttonto attach the web app to the bot
- 🎯 Frontend Web App:
http://localhost:8080or yourngrokURL - 🧠 Backend API:
http://localhost:5000 - 🤖 Telegram Bot Mini App: use your bot and tap the web button
Customize limits and behavior by editing:
| File | Purpose |
|---|---|
.env |
BOT token, file size/duration limits, ngrok domain |
ngrok.yml |
Public tunnel mapping |
docker-compose.yml |
Port exposure and service control |
nginx.conf.template |
Proxy rules & CORS support |
entrypoint.sh |
Dynamic frontend + backend routing |
- 🕒 Max file duration:
360s(set in.env) - 📦 Max file size:
20MB(set in both.envandnginx.conf.template) - 🔁 Daily message limit:
3messages per user (example value)
Questions or contributions?
- ✉️ Email: [email protected]
- 💻 GitHub: @PhillMckinnon
This project is licensed under the MIT License.