title: GNtranscribe description: Telegram bot — audio transcription via whisper-server host: tgbots-vm status: active last_reviewed: 2026-09-22 owner: gmikcon confidence: 100 review_interval: 90
Telegram bot @gntranscribe_bot on VM tg_bots (192.168.1.254). Users forward or send voice messages, audio files, video circles or videos; the bot queues them and returns the transcript from whisper-server on bserv-host (192.168.1.130:8008, model ggml-large-v3-turbo-q5_0, auto language detect).
Deployed 2026-09-20 by navi instance rei on owner request.
ALLOWED_CHAT_IDS in .env (comma-separated; empty = open to everyone). Non-whitelisted users get their chat_id back with a deny message./start, /help, /id (shows chat_id/user_id for whitelist setup), /status (queue size, worker state, counters, uptime).MAX_FILE_MB).ubuntu/home/ubuntu/bots/GNtranscribe — bot.py, .env, requirements.txt, gntranscribe.service, venv/gntranscribe.service (User=ubuntu, Restart=always, RestartSec=30), enabled (multi-user.target.wants).env): BOT_TOKEN (stored in gnexus-creds secret "GNtranscribe token", not in docs), WHISPER_URL=http://192.168.1.130:8008/inference, MAX_FILE_MB=24, MAX_QUEUE=20, WHISPER_TIMEOUT=600, ALLOWED_CHAT_IDS= (empty)/home/ubuntu/bots/GNtranscribe/logs/bot.log (rotating, 2 MB x 3) and journalctl -u gntranscribe.servicebserv-host (POST /inference, multipart file=@)getMe → ok, @gntranscribe_bot.enable --now; two consecutive restarts passed.User reported the bot replying "не удалось расшифровать, сервис транскрибации недоступен". Diagnosis (navi rei):
job failed chat=221397150: Timed out after only 7.2 s / 5.5 s.whisper attempt N/3 failed retry warnings in the log (whisper retries log them), and the whisper timeout is 600 s — a 5–7 s failure cannot be a whisper timeout.TimedOut exception from a Telegram Bot API call (PTB default read timeout 5 s) — most likely send_chat_action/send_message around the job. The generic except Exception in process_job sent the misleading "сервис транскрибации недоступен" message for ANY job exception, including Telegram API timeouts.Known failure mode (triage rule):
job failed ... Timed out in ~5–10 s with NO whisper attempt warnings → Telegram Bot API timeout, transcription service is fine.whisper attempt N/3 failed warnings → actual whisper-server problem (check bserv-host GPU/Ollama load).Patch to bot.py (backup: bot.py.bak-20260922, original 16413 B):
from telegram.error import TimedOut added to imports.Application.builder() now sets all PTB timeouts to 30 s: read_timeout, write_timeout, connect_timeout, pool_timeout, get_updates_read_timeout, get_updates_write_timeout, get_updates_connect_timeout, get_updates_pool_timeout (PTB default was 5 s — the source of the false "service unavailable").process_job catches telegram.error.TimedOut separately BEFORE the generic except Exception: logs Telegram API timed out ... transcription service is fine, user asked to retry and sends the user "⏳ Telegram не ответил вовремя — сервис транскрибации в порядке. Перешли сообщение ещё раз." instead of the misleading "сервис транскрибации недоступен".Verification: py_compile OK; systemctl restart gntranscribe.service → active (running), worker started, GNtranscribe started as @gntranscribe_bot, Application started (10:34:34 UTC, PID 257995). Rollback: cp bot.py.bak-20260922 bot.py && sudo systemctl restart gntranscribe.service.
sudo systemctl restart gntranscribe.serviceALLOWED_CHAT_IDS in .env, then restart.BOT_TOKEN in .env and the gnexus-creds secret, restart.