Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AmiraliNotFound/dummy-gemini-bot/llms.txt

Use this file to discover all available pages before exploring further.

Dummy Gemini Bot ships with two text-to-speech engines: Microsoft Edge TTS (free, no API key required, natural Persian neural voices) and Google Gemini TTS (expressive, prompt-steerable audio generation backed by your Gemini API quota). The active engine, voice selection, pitch, and failover rules are all runtime-configurable from the admin dashboard Settings tab without restarting the bot.

Config Key Reference

KeyDefaultDescription
TTS_ENGINEedgeActive TTS engine: edge or gemini
TTS_GEMINI_MODELgemini-2.5-flash-preview-tts,gemini-3.1-flash-tts-previewComma-separated list of Gemini TTS model IDs. The bot tries each in order on failure
TTS_GEMINI_VOICEKoreGemini voice name. Available options: Kore, Puck, Fenrir, Aoede, Charon
TTS_EDGE_VOICEfa-IR-FaridNeuralEdge TTS voice name. Persian options: fa-IR-FaridNeural, fa-IR-DilaraNeural
TTS_FALLBACK_TO_EDGETrueIf Gemini TTS fails entirely, fall back to Edge TTS. Accepts True or False
TTS_VOICE_PITCH1.0Edge TTS pitch multiplier. 0.85 produces a deeper voice; 1.0 is the default natural pitch
MONITOR_LIMIT_TTS_RPM15TTS requests-per-minute threshold for the dashboard Limits tab
MONITOR_LIMIT_TTS_RPD1500TTS requests-per-day threshold for the dashboard Limits tab

Engine Comparison

FeatureEdge TTSGemini TTS
CostFreeConsumes Gemini API quota
API key requiredNoYes (GEMINI_API_KEY)
Persian neural voices✅ (fa-IR-FaridNeural, fa-IR-DilaraNeural)
Expressive / prompt-steerable
Audio output formatOGG/Opus (via ffmpeg conversion)OGG/Opus (via ffmpeg conversion)
Works without internet quota

Raw PCM Handling

Gemini TTS can return audio in raw PCM / audio/L16 format at 24 kHz mono rather than a compressed container. The bot automatically detects this content type and invokes ffmpeg to convert the raw PCM stream into a Telegram-compatible OGG/Opus file before sending. No manual configuration is required — ffmpeg must simply be available in the system PATH.

Gemini TTS Failover

TTS_GEMINI_MODEL accepts multiple comma-separated model IDs. When a TTS request is made with TTS_ENGINE=gemini, the bot attempts generation with the first model ID. If that call fails (rate limit, model unavailability, or API error), it automatically tries the next model in the list. If every Gemini TTS model fails and TTS_FALLBACK_TO_EDGE is True, the bot silently falls back to Edge TTS using the voice configured in TTS_EDGE_VOICE, ensuring that a voice message is always delivered even during Gemini API outages.
For a completely free setup with zero API cost, set TTS_ENGINE=edge. The fa-IR-FaridNeural (male) and fa-IR-DilaraNeural (female) voices produce natural-sounding Persian speech at no cost and with no rate limits.

Build docs developers (and LLMs) love