Portfolio
Telegram bot for text-to-speech voiceovers
A Telegram bot that automates voicing texts in several languages. The project was built to simplify work with multilingual content and produce audio files automatically.
The bot accepts text files marked up by language, voices each fragment with modern text-to-speech services and sends back a ready archive with a clean file structure.
How it works
The user uploads an MD file with headings like # UA0, # ES1 and so
on, where the letters mark the language (UA - Ukrainian, ES - Spanish, etc.) and the digit
is the fragment number.
The bot parses the file, detects the languages and text parts, and the user picks a voiceover service:
- ElevenLabs - instant voiceover for English, German and French
- Google AI Studio (Gemini TTS) - a choice of 11 voices with an optional style prompt, for any language
Once done, the bot builds a ZIP archive organized by language and sends it to the user. All files are also stored locally.
Main features
- Uploading and parsing MD files with multilingual content
- Automatic detection of languages and text fragments
- ElevenLabs API integration for high-quality voiceover
- Google AI Studio (Gemini TTS) integration for multilingual voiceover
- A choice of 11 Google AI voices with different characteristics
- An optional voiceover style prompt for fine-tuning
- Automatic ZIP archive creation with an organized structure
- Local file storage organized by language
- Rate limit handling with automatic retries
Technical highlights
- API rate limit handling with exponential backoff
- Automatic PCM-to-WAV audio conversion for Google AI
- Output files organized by language and fragment number
- Support for different audio formats (WAV for Google AI, MP3 for ElevenLabs)
- Asynchronous request processing for good throughput
Tech stack
Result
A working Telegram bot that automates voiceover of multilingual content. It runs on two TTS services, giving flexibility in voice quality and style.
The rate limit handling keeps the bot stable on the Google AI Studio API despite the strict free-tier limits. Users get ready archives with an organized file structure, which makes further work with the voiced content much easier.