C# project inspired by https://github.com/GabrielRF/VideoCaptionsBot, the project aims solely for the development of programming skills and knowledge.
Telegram bot under development for captioning and/or translating videos using the Openai-whisper API (https://github.com/RageAgainstThePixel/OpenAI-DotNet) and the Telegram API (https://github.com/TelegramBots/Telegram.Bot).
✔️ Caption Video:
When receiving a video, the bot will generate a caption (.srt
file) for the video. By default, this file uses the same language as the video.
✔️ Translate Caption:
Currently, this function is generating the translation using the same language as the account that sent the video.
🔨 Select Language:
Functionality under development.
-
Openai-whisper API: https://github.com/RageAgainstThePixel/OpenAI-DotNet
-
Telegram API (Client .Net): https://github.com/RageAgainstThePixel/OpenAI-DotNet
After downloading the project, you need to:
Telegram Bot API:
- Contact https://t.me/botfather on Telegram.
- Click on "Create a new bot" (and follow all the creation steps).
- Finally, save the provided API token (if you need to consult it later, simply go to "My bots," select your bot, and click on "API Token").
OpenAI API (paid)
- Simply access https://platform.openai.com/account/api-keys and generate the token.
- Telegram.Bot: A library for interacting with the Telegram API.
- OpenAI: A library for interacting with the OpenAI API.
- OpenAI.Audio: A library for handling audio in the OpenAI API (Caption generation/Translation).
- Xabe.FFmpeg: Used for video editing (Including subtitles in the video).
- System.Diagnostics: Used for diagnostics and debugging.
- System.Configuration: A library for configuring values from a configuration file.
- System.Text and System.IO: Standard libraries for text manipulation and file operations.
- Telegram.Bot.Types.ReplyMarkups: A library for creating bot responses with reply markups (currently not used).
When running the bot for the first time, you will need to install these libraries, and then you can run the bot. 🏆
All contributions are welcome!
- Check the open issues and, if possible, suggest solutions.
- Open new issues.
- Submit a PR (preferably linked to an issue).
André Luiz |
---|