An open API service indexing awesome lists of open source software.

https://github.com/tjtanjin/simple-transcriptions

Telegram bot that allows users to upload audio, video and images for transcription.
https://github.com/tjtanjin/simple-transcriptions

Last synced: about 2 months ago
JSON representation

Telegram bot that allows users to upload audio, video and images for transcription.

Awesome Lists containing this project

README

          



Simple Transcriptions





## Table of Contents
* [Introduction](#introduction)
* [Features](#features)
* [Technologies](#technologies)
* [Setup](#setup)
* [Deployment](#deployment)
* [Team](#team)
* [Contributing](#contributing)
* [Others](#others)

### Introduction
Ever found yourself needing a quick way to pull out the contents of an audio, video or even a photo? Perhaps you even need a quick summary? Well, [Simple Transcriptions](https://t.me/SimpleTranscriptionsBot) is just what you need!

[Simple Transcriptions](https://t.me/SimpleTranscriptionsBot) is a telegram bot that allows users to upload files (audio, video and images) to generate a transcript. Upon receiving a transcription, users are also provided with options to request for a summary of the content or even provide your own custom instructions. Whether you're looking to quickly digest a media content or dive deeper into an area of interest, this bot brings to you the convenience that you need! Should this appeal to you, then its usage is as simple as dropping your files to the [bot](https://t.me/SimpleTranscriptionsBot) or sending in a voice message today!

### Features
Simple Transcriptions currently accepts 3 types of input (audio, video and images). Supported formats for each type can be found within the [*.env.template*](https://github.com/tjtanjin/simple-transcriptions/blob/master/.env.template) file. By default, all supported formats are included within the template, but you can always remove any of the formats as desired.

If you require support for additional formats that are not yet available in the application, feel free to open an issue or even better, make a pull request and help make the project better!

### Technologies
Technologies used by Simple Transcriptions are as below:
#### Done with:





Python

#### Project Repository
- https://github.com/tjtanjin/simple-transcriptions

### Setup
The following section will guide you through setting up your own Simple Transcriptions (**[telegram](https://web.telegram.org/) account required**).
1) First, head over to [BotFather](https://t.me/BotFather) and create your own telegram bot with the `/newbot` command. After choosing an appropriate name and telegram handle for your bot, note down the **bot token** provided to you.
2) Next, `cd` to the directory of where you wish to store the project and clone this repository. An example is provided below:
```
cd /home/user/exampleuser/projects/
git clone https://github.com/tjtanjin/simple-transcriptions.git
```
3) Once the project has been cloned, `cd` into it and install required dependencies with the following command:
```
python3 -m pip install --no-cache-dir -r requirements.txt
apt-get install tesseract-ocr
```
4) Following which, create (or copy) a *.env* file at the root of the project using the provided [*.env.template*](https://github.com/tjtanjin/simple-transcriptions/blob/master/.env.template). In order to run the bot, the bare minimum that needs to be done is for you to replace the **BOT_TOKEN** variable within the *.env* file with the token you received from [BotFather](https://t.me/BotFather).
5) You can also feel free to modify the other variables as you deem fit. Clear descriptions for the variables have been included in the [*.env.template*](https://github.com/tjtanjin/simple-transcriptions/blob/master/.env.template) file.
6) Optionally, you may also head over to Google to get a Gemini API key. Do note that if a Gemini API key is not set, the summary and custom instruction feature will not work.
7) Finally, head to the root of the project and execute the following command to launch your bot:
```
python3 main.py
```

### Deployment

#### Docker
For deployment, Docker is the preferred approach, especially if you would like to avoid the hassle of manually installing dependencies. If you are unfamiliar with docker, it is recommended you go through a quick tutorial for it first. This section **will not** dive into the details of docker usage.

1) First, if you have not done so, create a *.env* file from the provided [*.env.template*](https://github.com/tjtanjin/simple-transcriptions/blob/master/.env.template) and update the variables (at the very least, you need to input a valid **BOT_TOKEN**).
2) If you using the project as it is (**i.e. no intended code changes**), then simply run `./deploy.sh simple-transcriptions` within the scripts folder and your deployment will be automatically done! Otherwise, if you wish to make code changes to the project, please read on.
3) Once you are done with your code changes, you would have to build your own docker image with the following command (take note to replace the tag `-t` with that of your own):
```
docker build -t tjtanjin/simple-transcriptions .
```
4) Upon obtaining your image, you may then start your container with the following command (remember to replace image name below if you built your own image):
```
docker run -d --name smc --env-file .env tjtanjin/simple-transcriptions:master
```
Note: Notice that the *.env* file we configured in **step 1** is being passed via the `--env-file` argument. This is true for the auto deployment in **step 2** as well. Hence, ensure that you have setup your configuration properly before passing in the file.
5) Finally, you may wish to **update the deployment script** to reference your own image/container if you would like to have an easier deployment workflow.

#### Manual
Alternatively, if you are unfamiliar with docker or would like a more manual approach, you may also follow the guide [here](https://tjtanjin.medium.com/how-to-host-a-telegram-bot-on-ubuntu-a-step-by-step-guide-a38fb8c04f72) to setup the bot 24/7. Note that you would have to go through the steps in the [setup](#setup) section to setup the project manually as well.

### Team
* [Tan Jin](https://github.com/tjtanjin)

### Contributing
If you wish to make code contributions to the project, then please be advised to give the [*Developer Guide*](https://github.com/tjtanjin/simple-transcriptions/blob/master/docs/DeveloperGuide.md) a read. Once you are ready, feel free to open a pull request and describe clearly the changes and what they are intended to do (enhancement, bug fixes etc).

Alternatively, you may contact me via [**discord**](https://discord.gg/X8VSdZvBQY) or simply raise bugs or suggestions by opening an [**issue**](https://github.com/tjtanjin/simple-transcriptions/issues).

### Others
For any questions regarding the implementation of the project, you may reach out on [**discord**](https://discord.gg/X8VSdZvBQY) or drop an email to: cjtanjin@gmail.com.