Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

gsi-upm/video-sentiment-analysis

Repository files navigation

Introduction

This project makes use of various APIs to analyze videos in real-time. It can also store the data from an analysis for later access.

When running a live analysis, the Google Web Speech Recognition API is used to transcribe the video as it is playing. Then, after every few words, a phrase is sent to the SEAS API. A sentiment value is parsed from the result and displayed in a line graph.

It can be also be used in a larger scope by providing sentiment analysis for video media.

Installation Instructions

Make a local copy of the folders containing the controller and widget (or one of them individually since they can function independently). Then, install the requirements1 listed in the stable-req.txt file.

Once the necessary libraries are installed, run the server.py file. By default the sites will be available at:
Controller - https://localhost:8676
Widget - https://localhost:8675

Usage

####Live Analysis:

  1. Insert a video name (optional for the widget) and link.
  2. Select a dictionary.
  3. Select Live Analysis and press Submit.
  4. Modify the language and country accordingly.2
  5. Press play to start recognition and play the video.3,4
  6. Press pause to stop recognition and pause the video.
  7. Use the Jump to time text box to skip to a particular time in the video.

Warning: The in-browser Google Speech Recognition API that this project uses relies on microphone input. Thus, in order for it to work correctly, it is up to the user to redirect the video's sound output to his/her microphone.

####Existing Analysis:

  1. Select the transcript name and press submit.
  2. Use play, pause, and Jump to time to control the video.5

Overview

Controller Widget
Analysis Live Live or Existing
Database Storage Only Access Only

Notes

1 The cryptography library will fail to install if it is missing dependencies. More information is available here.
2 The language options can be repeatedly modified at any time.
3 Microphone permission will be required the first time the site loads.
4 When using the controller, the data is also recorded to a database in MongoDB. The default name is transcript_database.
5 The data and subtitles will automatically adjust.

General:
The browser will repeatedly ask for microphone permission if SSL is not used.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published