Skip to content

Python script to generate a PDF report based on sentiment analysis, words usage, personality insights, tone analysis and facial expressions from an input video. A project I got to do as an Intern.

Notifications You must be signed in to change notification settings

atharva-lipare/speech-to-senti-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

speech-to-senti-report

  • As an Intern I wrote this script that generates a PDF report based on sentiment analysis, word cloud, most used words, personality insights, tone analysis and facial expressions from an input video.
  • This script is now in production.

Demo

Sample PDF report generated by the script.

Built With

Setup:

  • Download FFMPEG from here and add to PATH for Windows.
  • Inside project directory create virtual environment.
python -m venv env
.\env\Scripts\Activate
  • Install dependencies
pip install -r requirements.txt

Script Walk-through

  • Will constantly look for changes within the input directory.
  • When a new file gets completely copied/downloaded the script will proceed to split audio from the video file using FFMPEG and then split the audio file in 4 equal parts to later perform sentiment analysis across the duration of the video.
  • Following which it uses Watson Speech-to-text to get a transcript from the split audio files.
  • From the received text it then uses VADER to perform sentiment analysis.
  • Then generates top used words after performing lemmatization by using numpy and nltk.
  • It then gets a predicted personality report of the person speaking in the video.
  • It then gets predicted emotions during the course of the video.

Usage

  • With the input video directory and output report directories are created and specified, the script looks for changes within input directory and then places the report generated in the output directory.

Running the script:

  • The script takes in 2 input arguments the input directory and output directory.
python main.py \path\to\video\directory \path\to\output\report\directory

About

Python script to generate a PDF report based on sentiment analysis, words usage, personality insights, tone analysis and facial expressions from an input video. A project I got to do as an Intern.

Topics

Resources

Stars

Watchers

Forks

Languages