Version: 3.0.0
Last Updated: February 2025
Status: Production Ready ✅
- Quick Start
- Two-Docker Deployment (Whisper + Bot)
- What's New in v3
- Complete Feature List
- User Guide
- Commands Reference
- Technical Details
- Deployment
- Troubleshooting
- Configure
.envwith yourBOT_TOKEN - Start both services:
cd /path/to/InnerVoice
make up
# or: ./deploy.sh up
# or: docker compose up -d --build- Open Telegram and send
/startto your bot - Send a voice message - first audio works immediately (default Spanish)
- 📝 Transcription in original language (if Full mode)
- 🌐 Translation to English (always)
- 🎯 Plain text format - click to copy
- ⚡ Real-time progress updates
- 🔒 100% private - all processing local
InnerVoice runs as two separate containers on the TelegramNet network:
| Service | Role | Limits | Hardware |
|---|---|---|---|
| whisper | Whisper API (Gunicorn) | 5G RAM, 4 CPUs | AMD GPU (ROCm) |
| bot | Telegram bot (aiogram) | 512M RAM | CPU only |
- Whisper container: Uses model from
WHISPER_MODEL(default in compose: medium). Lazy-loads on first transcription so the server binds to port 9000 immediately. Exposes/transcribe,/health,/gpu-check. Runs on AMD GPU via ROCm (image:rocm/pytorch:latest) with Gunicorn. Compose uses AMD-recommended options:seccomp=unconfined,SYS_PTRACE,ipc=host,shm_size: 2g,/dev/kfd,/dev/dri,videoandrendergroups. - Bot container: Receives voice from Telegram, converts OGG→WAV with ffmpeg, sends WAV to Whisper API via HTTP. Lightweight, no GPU.
- Network: Both join
TelegramNet; bot reaches Whisper athttp://whisper:9000.
Run from the project root (directory containing docker-compose.yml); otherwise you may see "no configuration file provided".
# Start both
make up
./deploy.sh up
# Start only bot (Whisper must already be running)
make up-bot
./deploy.sh up-bot
# Start only Whisper (e.g. for other apps)
make up-whisper
./deploy.sh up-whisper
# Stop all
make down
./deploy.sh down
# Logs
make logs
make logs-bot
make logs-whisperDefault is GPU (ROCm). The compose file uses AMD's recommended run options for the prebuilt rocm/pytorch image:
security_opt: seccomp=unconfined,cap_add: SYS_PTRACE,ipc: host,shm_size: 8gdevices: /dev/kfd,/dev/dri,group_add: video,group_add: renderROCR_VISIBLE_DEVICES=0,HSA_OVERRIDE_GFX_VERSION=11.0.0(compose default for APU/iGPU; change if needed)WHISPER_MODEL=medium,VRAM_THRESHOLD_FREE_MB=1536(compose default; usetinyorsmallif you have less VRAM)
Host requirements: AMD GPU with ROCm support, /dev/kfd and /dev/dri available, user in video and render groups.
CPU fallback: If Whisper keeps restarting or you have no AMD GPU, use CPU: in docker-compose.yml set build.dockerfile: Dockerfile.cpu for the whisper service and remove the ROCm-specific options (security_opt, cap_add, ipc, shm_size, devices, group_add, ROCR_VISIBLE_DEVICES).
If you run Ollama on the same GPU, Whisper is lower priority:
- Whisper checks VRAM before processing; if free VRAM < threshold (
VRAM_THRESHOLD_FREE_MB, default 1024 in compose), returns503 gpu_busy - Bot shows “Whisper is busy” and a Retry button
- Ollama takes precedence; when Ollama frees VRAM, use Retry
To use a different GPU (e.g. eGPU on device 1), set ROCR_VISIBLE_DEVICES=1 (or the desired index) in the whisper service environment in docker-compose.yml.
- Whisper: 5G memory, 4 CPUs (tune in
docker-compose.ymlif needed) - Bot: 512M memory, 0.5 CPU
VRAM_THRESHOLD_FREE_MB: compose default 1536 (for medium model); increase if using a larger model
The Whisper container can be used by other apps: it exposes http://whisper:9000 (or localhost:9000 if port is published) with:
POST /transcribe– multipart form:audio(WAV), optionallanguage,task(transcribe/translate),return_segments. Model is loaded on first request (lazy).GET /health–status,model;vram_used_mb/vram_total_mbonly after the model has been loadedGET /gpu-check– diagnostic: GPU probe without loading model (for ROCm troubleshooting)
- Whisper and Bot run in separate containers on
TelegramNet - Whisper uses ROCm/eGPU; Bot is lightweight (CPU only)
- Deploy separately:
make up-bot,make up-whisper - Whisper API reusable for other apps
- Default UI and audio language: Spanish
- First voice message works immediately (no language selection required)
- Change UI language in
/settings
- If GPU/VRAM is loaded (e.g. Ollama), Whisper returns "busy"
- Bot shows message + Retry button
- Click Retry when GPU is free (no need to resend from Telegram)
- Same audio within 60 seconds → skipped (avoids double processing)
- Same audio after 60 seconds → processed (for testing)
- In Full mode stats: VRAM usage from Whisper
/health
Before: Text in code blocks with "Copy Code" button
Now: Clean plain text, click anywhere to copy
Why This Matters:
- ✅ Much more readable
- ✅ Easier to copy
- ✅ Professional appearance
- ✅ No annoying buttons
Example:
🎤 Transcription (Spanish)
Original language
Hello this is my transcription text that you can easily read
and copy by simply clicking on it. No more code blocks!
Before: All bot messages in English only
Now: Choose Spanish or English interface
What Changes Language:
- ✅ All command responses
- ✅ Status messages (Audio received, Processing...)
- ✅ Headers (Transcription, Translation)
- ✅ Help and information messages
- ✅ Statistics and completion messages
- ✅ Error messages
What Doesn't Change:
- ❌ Transcription content (always in original language)
- ❌ Translation content (always in English)
Before: Sometimes missing for short audio
Now: Always shows, updates in real-time
What You See:
⚡ Processing Audio
Progress: ▓▓▓▓▓░░░░░ 50%
Segment: 5/10
Elapsed: 45.2s
ETA: 43s
- Single user queue (no parallel overhead)
- More reliable processing
- Perfect for internal tools
- Accuracy: OpenAI Whisper (Medium model)
- Languages: 12+ languages supported
- Quality: State-of-the-art speech recognition
- Speed: ~30 seconds per 30 seconds of audio
- Target: Always English
- Source: Any of 12+ supported languages
- Method: Whisper's built-in translation
- Quality: Native-level accuracy
Fast Mode (🚀):
- Only English translation
- ~50% faster
- Best for: Quick notes, when original doesn't matter
Full Mode (📝):
- Original transcription + English translation
- Two separate messages
- Best for: Learning, documentation, reference
| Language | Code | Optimization |
|---|---|---|
| Spanish | es | ✅ Default |
| English | en | ✅ |
| French | fr | ✅ |
| Dutch | nl | ✅ |
| Portuguese | pt | ✅ |
| German | de | ✅ |
| Italian | it | ✅ |
| Japanese | ja | ✅ |
| Korean | ko | ✅ |
| Chinese | zh | ✅ |
| Russian | ru | ✅ |
| Arabic | ar | ✅ |
Per-User Configuration:
- UI Language: Spanish or English (bot messages)
- Audio Language: Optimize Whisper for your language
- Mode: Fast or Full processing
- Statistics: Show/hide processing stats
- Timestamps: Add time markers [MM:SS]
Access via: /settings, /lang, /mode
- Real-time progress bar
- Percentage display
- Segment counter
- Elapsed time
- Estimated time remaining (ETA)
- Updates automatically
- Disappears when complete
- Handles 30+ minute recordings
- Segment-based processing (30s chunks)
- Memory efficient
- Automatic message splitting (4096 char limit)
- No audio loss (Telegram backup)
- Complete transcription delivered
When enabled:
[00:00] First sentence here
[00:15] Second sentence here
[00:32] Third sentence continues
[01:05] And so on...
Perfect for:
- Meeting notes
- Podcast transcription
- Interview documentation
- Reference material
-
Send
/startto the bot -
Choose your language:
- 🇪🇸 Español for Spanish interface
- 🇬🇧 English for English interface
-
Confirmation:
✅ Language set to English! 🎙️ Send me a voice message to get started. -
Send a voice message
-
Watch the progress:
🎵 Audio Received Duration: 45s Language: 🇪🇸 Spanish Mode: 📝 Full Mode Segments: 2 ⏳ Processing... [Progress bar updates appear] -
Get your results:
🎤 Transcription (Spanish) Original language [Your transcribed text here] 🌐 Translation (English) [Your translated text here] -
Copy text: Just click on the message!
Change Mode:
/mode → Select Fast or Full
Change Audio Language:
/lang → Select your spoken language
Full Settings:
/settings → Access all options
The /settings command shows:
- Language: Audio language optimization
- Mode: Fast vs Full processing
- Stats: Toggle processing statistics
- Timestamps: Toggle time markers
Each setting has a toggle button - click to change!
Best for quick English output:
/mode→ 🚀 Fast Mode- Send voice message
- Get only English translation
- ~50% faster processing
Use When:
- You don't need the original language
- Speed is priority
- Taking quick notes
- Simple voice-to-text
Best for complete transcription:
/mode→ 📝 Full Mode- Send voice message
- Get:
- Original language transcription
- English translation
- Both in separate messages
Use When:
- Learning a language
- Need both versions
- Documentation purposes
- Original wording matters
Recording 15-30+ minute audio?
- Just send it - no need to split
- Watch progress - see real-time updates
- Wait patiently - may take 10-20 minutes
- Get complete text - all at once
The bot:
- ✅ Processes in 30s segments
- ✅ Shows progress throughout
- ✅ Accumulates complete text
- ✅ Splits into multiple messages if >4096 chars
- ✅ Cleans up temp files automatically
How to Copy:
- Tap the message with transcription/translation
- Hold (long press on mobile)
- Select Copy from menu
- Paste wherever you need
Or on Desktop:
- Click message to select all
- Ctrl+C / Cmd+C to copy
- Paste wherever you need
No formatting, no emojis, no buttons - just pure text!
| Command | Description | Example |
|---|---|---|
/start |
Welcome + language selection | First time setup |
/help |
Detailed usage guide | Get instructions |
/about |
Technical information | Learn about the tech |
/settings |
Full settings panel | Configure all options |
/lang |
Quick audio language change | Switch to French |
/mode |
Quick mode toggle | Fast vs Full |
First Use: Shows language selection (Spanish/English)
After Setup: Shows welcome message in your language
English:
🎙️ Welcome to InnerVoice!
Your privacy-first voice transcription bot.
Send a voice message and get:
📝 Transcription in original language
🌐 Translation to English
⚡ Fast processing with Whisper AI
All processing happens locally - your audio stays private.
Spanish:
🎙️ ¡Bienvenido a InnerVoice!
Tu bot de transcripción de voz con privacidad.
Envía un mensaje de voz y obtén:
📝 Transcripción en idioma original
🌐 Traducción al inglés
⚡ Procesamiento rápido con Whisper AI
Todo el procesamiento es local - tu audio permanece privado.
Shows comprehensive usage instructions including:
- How to use the bot
- Mode explanations (Fast vs Full)
- Language settings info
- Current preferences
- Pro tips
Technical details:
- Technology stack (Whisper, FFmpeg, Python)
- Capabilities (languages, audio length)
- Requirements (hardware)
- Privacy information
- Contact info
Interactive settings panel with buttons:
- Language: Change audio language optimization
- Mode: Toggle Fast/Full mode
- Stats: Show/hide processing statistics
- Timestamps: Enable/disable time markers
Quick access to language selection:
- Shows current audio language
- Grid of 12 languages with flags
- Click to change immediately
Quick mode toggle:
- Shows current mode
- Two options: Fast 🚀 or Full 📝
- Click to switch
Components:
- Bot Framework: aiogram (async Telegram bot) – runs in
botcontainer - Whisper API: Gunicorn + Flask with OpenAI Whisper (Medium, ROCm) – runs in
whispercontainer - Audio Processing: FFmpeg in bot (OGG→WAV), then HTTP POST to Whisper
- Token Counting: tiktoken
- Network: Both on
TelegramNet; bot callshttp://whisper:9000
Processing Flow:
- User sends voice → Telegram
- Bot downloads → Converts OGG to WAV
- Splits if >1MB (30s segments)
- POST each segment to Whisper API
- Accumulates text → Full transcription
- Sends results → Separate messages
- Cleanup → Deletes temp files
Storage:
- User Preferences: In-memory (defaultdict)
- Audio Files: Temporary (deleted after processing)
- Models: Cached in Whisper container volume (~1.5GB)
Processing Speed:
- Short audio (<30s): ~30 seconds
- Medium audio (5 min): ~5 minutes
- Long audio (30 min): ~20-30 minutes
Memory Usage:
- Base: ~2GB (Whisper model loaded)
- Per segment: +~500MB (during processing)
- Peak: ~4GB (long audio with multiple segments)
Disk Space:
- Whisper model: ~1.5GB
- Docker image: ~3-4GB
- Temporary audio: Minimal (auto-cleanup)
Minimum:
- CPU: 4 cores (Intel i5 or equivalent)
- RAM: 4GB available
- Disk: 10GB free space
- Network: Stable internet for Telegram API
Recommended:
- CPU: 8 cores (Intel i7 or equivalent)
- RAM: 8GB available
- Disk: 20GB free space
- Network: Fast connection for voice downloads
Optional:
- GPU: Not required (CPU-only processing)
- Storage: SSD preferred for faster model loading
Environment Variables (.env):
BOT_TOKEN=your_telegram_bot_token_hereDocker Compose (see Two-Docker Deployment):
services:
whisper:
build: ./whisper
# ROCm devices, memory limits...
bot:
build: ./bot
environment:
- WHISPER_API_URL=http://whisper:9000
volumes:
- ./.env:/app/.env:ro
- audio_temp:/app/audios
restart: unless-stopped
environment:
- TZ=UTC
deploy:
resources:
limits:
memory: 10GTimeouts (bot.py):
- Telegram API: 200 seconds
- Progress updates: Every 2 segments (long audio) or every segment (short audio)
- Message retry: 3 attempts with exponential backoff
User Preferences (per user):
{
'ui_language': 'es' | 'en', # Bot interface language
'language': 'es', # Audio language for Whisper
'mode': 'fast' | 'full', # Processing mode
'show_stats': True | False, # Display statistics
'timestamps': True | False # Add time markers
}Processing States (per audio):
{
'file_id': 'unique_id',
'segments': 5,
'current': 3,
'start_time': timestamp,
'progress_msg_id': message_id
}Telegram:
- Message length: 4096 characters (auto-split)
- File size: 20MB (voice messages)
- API calls: Rate limited (handled automatically)
Whisper:
- No API calls (local processing)
- No rate limits
- No usage costs
# Navigate to project
cd /path/to/InnerVoice
# Create .env with BOT_TOKEN
echo "BOT_TOKEN=your_token" > .env
# Build and start both (Whisper + Bot)
make up
# or: docker compose up -d --build# After modifying bot.py
docker compose restart bot# Clean rebuild
docker compose down
docker compose up -d --buildDefault configuration - No changes needed!
Advantages:
- ✅ Faster Docker build (~5-10 min vs 30+ min)
- ✅ Smaller image size (~3GB vs ~8GB)
- ✅ Works on any machine
- ✅ No CUDA drivers needed
- ✅ Good performance for most use cases
Performance:
- ~1:1 ratio (30s audio = 30s processing)
- Perfectly acceptable for personal use
- Handles 30+ minute audio fine
Only needed if you have NVIDIA GPU and want maximum speed.
To Enable GPU:
- Edit Dockerfile:
# Comment out this line:
# FROM python:3.10-slim
# Uncomment this line:
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
# Comment out normal pip install
# RUN pip install --no-cache-dir -r requirements.txt
# Uncomment GPU install:
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
RUN pip install --no-cache-dir openai-whisper aiogram python-dotenv tiktoken- Update docker-compose.yml:
services:
bot:
build: .
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]- Rebuild:
docker compose down
docker compose up -d --buildGPU Requirements:
- NVIDIA GPU with CUDA support
- NVIDIA Docker runtime installed
- ~8GB+ VRAM recommended
Performance:
- ~3-5x faster than CPU
- Useful for very frequent usage or very long audio
Recommendation: Stick with CPU unless you're processing many hours of audio daily.
# Real-time logs
docker compose logs -f bot
# Last 50 lines
docker compose logs --tail 50 botdocker compose down# Install dependencies
pip install -r requirements.txt
# Run bot
python3 bot.pyNote: Requires Python 3.10+, ffmpeg installed
Minor Changes (bot.py only):
docker compose restart botDependency Changes (requirements.txt):
docker compose down
docker compose up -d --buildConfiguration Changes (.env, docker-compose.yml):
docker compose down
docker compose up -dCheck container status:
docker compose psCheck logs:
docker compose logs botCommon causes:
- ❌ Invalid BOT_TOKEN in .env
- ❌ Bot not started (@BotFather)
- ❌ Container not running
- ❌ Out of memory
Solutions:
- Verify BOT_TOKEN is correct
- Restart:
docker compose restart bot - Check memory:
docker stats - Rebuild if needed
Normal behavior:
- Updates every segment for short audio (≤5 segments)
- Updates every 2 segments for long audio
- May appear "stuck" but is processing
Not a problem if:
- You eventually get the result
- Logs show processing activity
Check logs to confirm processing:
docker compose logs -f botCommon causes:
- Audio too long (>30 min) with low memory
- Corrupted audio file
- Unsupported format (rare)
Solutions:
- Check container memory:
docker compose logs bot | grep -i memory - Increase memory limit in docker-compose.yml
- Try shorter audio clip
- Check audio plays in Telegram
What you see: Bot logs Error processing segment X: Cannot connect to host whisper:9000 [Connect call failed (...)] for every segment.
Root cause: The Whisper container is not staying up (restart loop). The bot error is a symptom: nothing is listening on port 9000 because Whisper keeps crashing or never finishes starting.
What to do:
-
Confirm Whisper is unstable:
docker compose ps
If whisper shows "restarting" or exits soon after start, the service is down most of the time.
-
Check Whisper logs for the real failure (OOM, I/O, ROCm, etc.):
docker compose logs whisper --tail 200
-
Relax or remove block I/O limits: If the host or an override applies a low block I/O limit (e.g. ~tens of KB/s) to the whisper container, model loading and cache I/O become unsustainable and the process can hang or be killed, causing a restart loop. Ensure the whisper service is not subject to strict
blkiolimits (in docker-compose, on the host, or in your orchestrator). The project's compose does not set block I/O limits; if you use an override or host cgroups that cap I/O, raise or remove them for the whisper container. -
After Whisper is stable: Once the whisper container runs and listens on 9000, the "Cannot connect to whisper:9000" errors in the bot will stop. The network (e.g.
TelegramNet) is fine; the issue is the service not being up. -
Whisper exits 139 (segfault) or restarts: If you have a local GPU-TROUBLESHOOTING.md (optional, gitignored), see it for a full brainstorm. Otherwise: ensure host has
videoandrendergroups, tryWHISPER_MODEL=tiny,HSA_OVERRIDE_GFX_VERSION=11.0.3, imagerocm/pytorch:latest; or run Whisper on the host and point the bot at it.
Symptoms:
- Bot crashes during processing
- Container restarts
- No response on long audio
Solutions:
- Increase memory limit:
# docker-compose.yml
deploy:
resources:
limits:
memory: 16G # Increase from 10G- Restart with new limits:
docker compose down
docker compose up -d- Monitor memory:
docker stats innervoice-bot-1Whisper auto-detects but can be wrong
Solution:
- Set your language manually:
/lang - Select your spoken language
- Try again
Note: Language setting optimizes Whisper, improving accuracy
This is normal for long transcriptions!
Each message limited to 4096 characters (Telegram limit)
Messages will show:
━━ Part 1/3 ━━
[First part of text...]
Just copy each part - they're in order
On Mobile:
- Tap and hold message
- Select "Copy"
- Paste
On Desktop:
- Click message to select
- Ctrl+C (Windows) or Cmd+C (Mac)
- Paste
If still issues:
- Update Telegram app
- Try different device
- Forward message to "Saved Messages" and copy from there
A: No! Audio is deleted immediately after processing. Only temporary files during processing, then wiped.
A: No! Everything is private. Bot runs on your server, only you have access.
A: No. Needs internet to receive audio from Telegram and send results. Processing is local though.
A: Very accurate! Using OpenAI Whisper (Medium) - state-of-the-art AI. Accuracy depends on audio quality and clarity.
A: Forward voice messages from any chat to the bot. Direct call recording depends on your device.
A: Whisper handles multilingual audio but accuracy varies. Best results with single language per message.
A: Not currently. Translation is always to English. This is a design choice for simplicity.
A: Roughly 1:1 ratio. 5 minutes of audio = ~5 minutes processing. Longer for very long recordings.
A: Yes, but designed for 1-2 users. Each user has separate settings. No parallel processing (sequential queue).
A: Settings are in-memory only. Set them once per user, they persist until bot restart.
A: Technically yes, but very slow. Whisper Medium needs good CPU. Not recommended for Pi.
Issues or Questions?
- Contact: @arkano21 on Telegram
- Check logs:
docker compose logs bot - Review this documentation
Support Development:
- ₿ Bitcoin:
bc1qwktevffc57rkk8lwyd6yqwxrvcd4vjxggcpsrn - ⚡ Lightning:
buffswan6@primal.net - 💜 Nostr:
npub1p2x3t3njq44vsk24qjkauzurvfd59c224qyu2mpgu9jverk9tfrqnz0ql5
License: Open source, self-hosted solution
Privacy Guarantee:
- ✅ All processing happens on YOUR server
- ✅ No data sent to external APIs
- ✅ No cloud storage
- ✅ No third-party access
- ✅ You control everything
Your Data, Your Control 🔒
Version: 2.1.0
Last Updated: November 14, 2025
Status: Production Ready ✅
Made with ❤️ by @arkano21