Inspiration

It helps people to easily live in the modern world where new information is created and posted every second. For our generation, it is very important to be able to easily understand, whether to watch or read something or not, to stay up-to-date and competitive. We thought that our project can help bloggers, newsmakers to get descriptions for their posts and videos faster and help different groups of users to distinguish between materials they really need and clickbait. Personally, we face this problem every day, when we have to find articles and videos relevant to our study field.

What it does

After the user sends URLs to articles or videos, the bot processes it, gives summaries of materials sent and voice it

How I built it

First of all, the user gets the opportunity to use the bot through the interface of the Telegram messenger - a specially created @CutVideoBot bot. Onboadring introduces the message into the user's course and adds it to mongoDB as a new user, assigns the corresponding state to it. As soon as the user sends a link to any material or YouTube video, we:

  1. If it's just a link to the site We load the text from the site using tldextract We process the text for extra characters through html2text We send for reduction in DeppAI Synthesizing voice using Google-text-to-speech (gtts) Change and speed up audio through pydub Add the resulting summary to MongoDB We send the user the summary text and the audio of this text

  2. If this is a YouTube link We load automatically generated subtitles video in any language Unload the full text of the subtitles and send to DeepAI for reduction Compare the remaining lines after reduction with subtitles and segments of fragments using fuzzywuzzy Download video from YouTube via pytube Cut the video into fragments and glue it using moviepy Add the resulting summary to MongoDB Save and send the user a video summary

Next, we again expect from the user a link to the following material.

Challenges I ran into

  1. It was quite difficult to learn how to distinguish between links to articles and videos
  2. I had problems with Telebot library

Accomplishments that I'm proud of

I'm very proud of the fact that we together finished the work in time, created a thing that will help people to stop reading unnecessary materials only because of the interesting name of articles/videos. It's also inspiring that bloggers will be able to create short introductions for their materials automatically.

What I learned

I have never made bots in my life. It was very interesting to learn how to do it, develop frontend part of the project, especially after interruption of the use of Python for almost one year.

What's next for Cutter Bot

We want to improve the quality of summaries and learn how to get a good voice for our sound part of answer. It would be also cool to implement things that will let people get their answers in turn.

Built With

  • deepai
  • fuzzywuzzy
  • gtts
  • html2text
  • langdetect
  • moviepy
  • pydub
  • pymongo
  • pytelegrambotapi
  • python
  • pytube
  • text-to-speech
  • tldextract
  • ubuntu
  • youtube-transcript-api
Share this project:

Updates