You are on page 1of 16

MINI PROJECT REPORT

On

Youtube Transcript Summarizer

Submitted in partial fulfillment of the

Requirements for the award of the Degree of Bachelor of Technology

In

Computer Science & Engineering

Under the esteemed guidance of

( Prof. Rakesh Kumar Roushan )

Submitted By: Submitted To:-

GROUP MEMBER NAME: Prof. Rakesh Kumar Roushan

Sushmita Raj(Team Leader): 20105125055

Trisha Raj: 21105125901

Anamika Rani: 20105125043

Sonam Kumari: 21105125903


ACKNOWLEDGEMENT

The merciful guidance bestowed to us by the almighty made us stick out

this project to a successful end. We humbly pray with sincere heart for this

guidance to continue forever. We pay thanks to our project guide Prof.

Rakesh Kumar Roushan who has given guidance and light tous during

this project. Her versatile knowledge has cased us in the critical times

during the span of this project. We also take this opportunity to express

our gratitude to all those people who have been directly and indirectly with

us during the completion of the project. We want to thanks our friends who

have always encouraged us during this project. At the last but not least

thanks to all the faculty of CS & IT department who provided valuable

suggestion.
TABLE OF CONTENTS

CHAPTERS:

ABSTRACT

CHAPTER 1: INTRODUCTION

1.1 SCOPE

1.2 PURPOSE

FEATURES

1.3: DOWNLOADABLE CHROME EXTENSION

1.4: SUMMARIZATION ALGORITHM:

CHAPTER 2: REQIUREMENTS & ANALYSIS

2.1 PLATFORM REQUIREMENTS

2.2 MODULE DESCRIPTION

CHAPTER 3: STEPS FOR YOUTUBE TRANSCRIPT SUMMARIZATION

3.1: BACK END

3.2: GET TRANSCRIPT

3.3: CONVERT AUDIO TO TEXT

3.4 TEXT SUMMARIZATION

CHAPTER 4: DESIGN

CHAPTER 5: LIMITATIONS

CHAPTER 6: FUTURE ENHANCEMENTS

CHAPTER 7: CONCLUSIONS
ABSTRACT

Every day, countless videos are being created and shared on YouTube and Such

videos are the primary source of learning for college and school going students,

people preparing for competitive exams and many more people use YouTube for

productive outcomes. But longer than expected videos can be difficult to watch,

and if we don't learn anything useful from them, our efforts might be in vain. Even

sometimes while watching video people face lots of obstacles like network issues

and all may lead to wastage of time. Automated summarization of video text

allows us to quickly spot important trends and efficiently streamline the video's

content, thus saving our time and efforts. In this YouTube transcript summarizer

web application developed using flask, the transcript of the video is converted

into text and thus summarizing that text and in case if there is no transcript

available then the model will convert the audio directly into text using speech

recognition followed by the summarization. Summary can be downloaded and

translate in different language. Summarization of the video is done by using

Python libraries and NLP (Natural Language Processing).

Keywords: YouTube, Text Summarization, flask, Speech recognition, Translator,

NLP.
1.INTRODUCTION

The YouTube Transcript Summarizer is a Chrome extension designed to condense lengthy video
transcripts into concise summaries.

In modern times, there is a vast quantity of videos being produced and shared on youtube
continuously. Globally, YouTube ranks as the second-highest frequented website.

YouTube offers a diverse selection of content, varying from short films and music videos to
feature films, documentaries, corporate sponsored movie trailers, live streams, vlogs, and other
material produced by famous YouTubers. Every day, video content on YouTube is being watched
collectively by its users for more than a total of one billion hours. In 2020, there were
approximately 2.3 billion people who used YouTube and the number of users has been quickly
growing each year. At a rate of 300 hours of video uploaded per minute, YouTube constantly
receives an immense amount of content.
According to research conducted by Google, almost 33% of viewers on YouTube in India use
their mobile devices to watch videos and spend more than 48 hours on the platform every month.
youtube is the primary source for each and every student where they can learn new concept and
can do the self study.But Watching such lengthy videos has become challenging because it is
possible to waste time without finding the desired information as our efforts may be unproductive
if we fail to retrieve the relevant information we seek. Searching for videos that contain the
relevant content can be a tedious and exasperating process. Many videos posted online involve a
speaker discussing a subject at length, yet it can prove challenging to locate the main message of
the presentation without viewing the entire video. Python offers different packages that can be
extremely useful. Accessing YouTube content, such as transcripts of videos, has now become
more convenient with the assistance of the API in the Python library. We are able to view the
video content directly and provide users with a summary by utilizing this benefit. One way to
achieve this is through the application of Hugging Face transformer, a method for summarizing
text. The generated summary is a result of using the hugging face transformer package.
Typically, written descriptions are used to encapsulate the content of YouTube videos rather than
automation. our model proposes the usage of a transformer package for summarizing the
transcripts of the video, thereby providing a meaningful and important summary of the video. Our
main concern is to summarize the data, by using the pre-trained summarization techniques.
1.1 SCOPE
The primary Scope is to provide users with a quick overview of video content
without having to watch the entire video.

1.2 PURPOSE
This project proposes the usage of a transformer package for summarizing the
transcripts of the video, thereby providing a meaningful and germane summary of
the video. T5 is an encoder-decoder model which is pre-trained on a set of
unsupervised and supervised tasks and for which each task is converted into a
text-to-text format. Our main concern is to summarize the data, so a pre-trained
summarization technique is used.

To increase the user interface to the functionality part Chrome extensions can be
used.This Chrome extensions contains a summarize button, which on click
displays the summarized text of the current YouTube video on the Google
Chrome web browser. This summarized text is generated by the hugging face
transformer package.

The YouTube videos are usually summarized through manual descriptions and
thumbnails. YouTube is the second most visited website worldwide. The range of
videos on YouTube includes short films, music videos, feature films,
documentaries, audio recordings, corporate sponsored movie trailers, live
streams, vlogs, and many other contents from popular YouTubers. YouTube
users watch more than one billion hours of video every day.
FEATURES

1.3 DOWNLOADABLE CHROME EXTENSION:

Users can easily install the extension from the Chrome Web Store, enhancing
accessibility.

Transcript Retrieval:

The extension fetches video transcripts directly from YouTube, utilizing YouTube
API for seamless integration.

1.4 SUMMARIZATION ALGORITHM

Utilizes advanced natural language processing (NLP) techniques to identify key


sentences and phrases for summarization.

User-Friendly Interface:

The extension integrates into the YouTube interface, allowing users to access
summarized content with ease.
2: REQIUREMENTS & ANALYSIS

2.1 PLATFORM REQUIREMENTS:

A. Recommended Operating System

1) Window 7

2) Linux: Ubuntu 16.04-17.10

B. Hardware

1) Processor: Minimum 1 GHz; Recommended 2GHz or more

2) Ethernet connection (LAN) OR a wireless adapter (Wi-Fi)

3) Hard Drive: Minimum 32 GB; Recommended 64 GB or more

4) Memory (RAM): Minimum 1 GB; Recommended 4 GB or above

C. Software

1) Python

2) Visual Studio

2.2 MODULE DESCRIPTION :

1) Flask

2) Ffmpeg
3: STEPS FOR YOUTUBE TRANSCRIPT SUMMARIZATION

1) Using a Python API, find the transcripts and subtitles for a particular YouTube

video ID.

2) If transcripts are available then perform text summarization on obtained

transcripts using HuggingFace transformers.

3) If transcript is not available then download then extract audio from the video

then using speech recognition convert audio into text.

4) Summarize the converted text.

5) We can translate summarized text in hindi,english and marathi by just

selecting a language to translate text.

6) If required we can download the summary in pdf format.

3.1 BACK END :

APIs changed the way we build applications, there are countless examples of

APIs in the world, and many ways to structure or set up our APIs [5]. We create a

back-end application directory containing files named as app.py. We initialize

app.py with basic Flask RESTful BoilerPlate. We then create a virtual

environment to isolate the location where everything resides. By activating the

newly created virtual environment we install the dependencies like Flask,

youtube_transcript_api, transformers using pip [6].


3.2: GET TRANSCRIPT:

In this module, we are going to utilize a python API which allows you to get the

transcripts/subtitles for a given YouTube video. It also works for automatically

generated subtitles, supports translating subtitles, and does not require a

headless browser like other Selenium-based solutions do.In app.py, we create a

function which will accept YouTube video id as an input parameter and return

parsed full transcript as output. As we get the transcript in the json format with

text, start and duration attributes we only need text so we parse the data from the

response to return the transcript in whole string format .

3.3: CONVERT AUDIO TO TEXT:


If transcripts are not available then the system will download audio using pytube

library in python. Now using ffmpeg convert the required audio file into .wav

format.Using python speech recognition module system will convert audio into

text.

3.4 TEXT SUMMARIZATION:

Text summarization is the task of shortening longer text into a precise summary

that preserves key information content and overall meaning. Thereare two
different approaches that are widely used for text summarization :Extractive

Summarization: In this the model identifies the important sentences and phrases from

the original text and only outputs the necessary part.

❖ REST API ENDPOINT

The following step is to define the resources that will be used in implementation

by this backend service. This is an extremely simple application, we only have a

single endpoint, so our only resource will be the summarized text .

● In app.py, We create a Flask API Route with GET HTTP Request method with

a URI http://[hostname]/api/summarize?youtube_url=#{url}. Then we extract the

YouTube video id from the YouTube URL which is obtained from the query

params. Then generate the summarized transcript by executing the transcript

generation function following the execution of the transcript summarizer function.

Finally, we return the summarized transcript with HTTP Status OK and handle

HTTP exceptions if applicable .

❖ CHROME EXTENSION

Chrome Extensions are the software programs that customize and


enhance the browsing experience. They enable users to enhance Chrome
functionality experience and behavior to individual preferences. They are
built on the web using web technologies such as HTML, CSS and
JavaScript. In this step, we create a chrome extension application
directory containing essential files required as mentioned below [10]. We
need to create a manifest.json file for loading our extension in the
browser. Go to the website chrome://extensions and make sure developer
mode is turned on from the top right-hand corner. Then select on Load
unpacked and select the folder containing the manifest file that we just
created. This creates our extension. We’ll need to reload the extension every
time we make a change in the extension .

❖ USER INTERFACE FOR EXTENSION POPUP


User interface is needed to ensure that the user can interact with the pop ups which is
one of the options among several types of user interfaces that a Chrome extension can
provide which generally appear upon clicking the extension icon in the browser toolbar.
Add the line below to page action in the manifest file which enables the User Interface
for a Popup . In the popup.html file, we include the popup.css file to make the styles
available to the HTML elements, popup.js file to enable user interaction and behavior
with the HTML elements. Then add a button element named Summarize which when
clicked will emit a click event which will be detected by an event listener to respond to it.
Add a div element where summarized text will be displayed when received from the
backend REST API Call. In the popup.css file, we provide appropriate CSS styling to the
HTML elements button and div to have a better user experience .
❖ DISPLAY SUMMARIZED TEXT
A user interface is implemented to enable users to interact and display the summarized
text but there are some missing links which must be addressed. In this step, we will add
functionality to allow the extension to interact with the backend server using HTTP REST
API Calls. In popup.js, when DOM is ready, we attach the event listener with the event
type as "click" to the Summarize button and pass the second parameter as an
anonymous callback function. In the anonymous function, we send an action message
generated using chrome.runtime.sendMessage method to notify contentScript.js to
execute summary generation. Add event listener chrome.runtime.onMessage to listen to
message results from contentScript.js which will execute the outputSummary callback
function. In the callback function, we display the summary in the div element
programmatically using JavaScript. Add the line below to content_scripts in the manifest
file which will inject the content script contentScript.js declaratively and execute the
script automatically on a particular page [14]. In contentScript.js, we add event
listenerchrome.runtime.onMessage to listen message generator which will execute
thegenerateSummarycallback function. In the call back function, extract the URL of the
current tab and make a GET HTTP request usingXMLHTTPRequestWeb API to the
backend to receive summarized text as a response. Send an action messageresultwith
summary payload using chrome.runtime.sendMessage to notify popup.js to display the
summarized text.

4: DESIGN
5: LIMITATIONS

❖ The summarization accuracy may vary based on the complexity and

structure of the video content.

❖ Long videos with extensive technical jargon may pose challenges for

accurate summarization.

6: FUTURE ENHANCEMENTS

❖ Integration of machine learning models for improved summarization

accuracy.

❖ User customization options for summary length and content prioritization.


7: CONCLUSIONS
The YouTube Transcript Summarizer Chrome Extension aims to streamline
content consumption by providing users with concise and relevant video
summaries, enhancing the overall user experience on the YouTube platform.

This project has proposed a YouTube Transcript summarizer. The system takes
the input YouTube video from the Chrome extension of the Google Chrome
browser when the user clicks on the summarize button on the chrome extension
web page, and access the transcripts of that video with the help of python API.
The accessed transcripts are then summarized with the transformers package.
Then the summarized text is shown to the user in the chrome extension web
page. This project helps the users a lot by saving their valuable time and
resources. This helps us to get the gist of the video without watching the whole
video. It also helps the user to identify the unusual and unhealthy content so that
it may not disturb their viewing experience. This project also ensures great user
interface experience in finding out the summarized text as chrome extensions
have been used. This helps in getting the summarized text without copying the
URL and pasting at terminals or by any third-party applications.
8.REFRENCES
[1] I. Awasthi, K. Gupta, P. S. Bhogal, S. S. Anand and P. K. Soni, "Natural Language
Processing (NLP) based Text Summarization - A Survey," 2021 6th International
Conference on Inventive Computation Technologies (ICICT), 2021, pp. 1310-1317, doi:
10.1109/ICICT50816.2021.9358703.

[2] AdhikaPramitaWidyassari, SupriadiRustad, GuruhFajarShidik, Edi Noersasongko,


Abdul Syukur, Affandy Affandy, De Rosal Ignatius Moses Setiadi,Review of automatic
text summarization techniques &methods,Journal of King Saud University - Computer
and Information Sciences,2020, ISSN 1319-1578,
https://doi.org/10.1016/j.jksuci.2020.05.006.

[3] P. R. Dedhia, H. P. Pachgade, A. P. Malani, N. Raul and M. Naik, "Study on


Abstractive Text Summarization Techniques," 2020 International Conference on
Emerging Trends in Information Technology and Engineering (icETITE), 2020, pp. 1-8,
doi: 10.1109/ic-ETITE47903.2020.087.

[4] A. Dilawari and M. U. G. Khan, "ASoVS: Abstractive Summarization of Video


Sequences," in IEEE Access, vol. 7, pp. 29253-29263, 2019, doi:
10.1109/ACCESS.2019.2902507.

[5] https://huggingface.co/transformers/installation.htm

[6] https://atmamani.github.io/blog/building-restful-apis-with-flask-in-python/

[7] https://pypi.org/project/youtube-transcript-api/

[8] https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask

[9] https://medium.com/swlh/parsing-rest-api-payload-and-query-parameters-with-flask-
better-than-marshmallow-aa79c889e3ca

[10] https://betterprogramming.pub/the-ultimate-guide-to-building-a-chrome-extension-
4c01834c63ec

[11] https://developer.chrome.com/docs/extensions/mv2/

You might also like