Skip to content

tjtanjin/simple-transcriptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Transcriptions

Table of Contents

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 is just what you need!

Simple Transcriptions 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 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 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

Setup

The following section will guide you through setting up your own Simple Transcriptions (telegram account required).

  1. First, head over to 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. 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.
  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 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 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 to setup the bot 24/7. Note that you would have to go through the steps in the setup section to setup the project manually as well.

Team

Contributing

If you wish to make code contributions to the project, then please be advised to give the Developer Guide 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 or simply raise bugs or suggestions by opening an issue.

Others

For any questions regarding the implementation of the project, you may reach out on discord or drop an email to: cjtanjin@gmail.com.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published