talsperre / LectureSummarizer

A lecture summarization tool that uses AI and computer vision to summarize and index videos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Executing on Windows

nitin2212 opened this issue · comments

In case there is a problem executing this code on Windows, follow the below steps:

#Create and activate the python environment
1) conda create -n speech_env python=3.8
2) conda activate speech_env

# Modify requirements.txt
3) Since I faced a lot of dependency issues while installing requirements.txt, erase all the versioning in requirements.txt
(In Notepad++, set Regular Expression and replace ==.* with nothing)

#Modify settings.py
4) Example: 'read_default_file': 'C:\Users\Nitin\LectureSummarizer\videoSummarizer\videoSummarizer\mysql.cnf'

# Fix a few imports errors
5) Replace url with re_path and force_text with force_str
6) The usage of enums and types are removed from google APIs, so edit them as mentioned in this page: https://github.com/googleapis/python-speech/blob/main/UPGRADING.md#enums-and-types

# Fixing KeyError problem in pandas
7) It was assumed that the generated file xxx_.stats.csv would contain the frame rate in its first row and the header columns will be in the second row. So while reading these files, skiprows=1 was used.
If the generated files do not contain the frame_rate in the first row (verify /video_metadata/xxx_stats.csv ), remove the skiprows=1 arguments (File PySceneDetection.py, line 137 and line 152 only)

# Create a folder "videos" inside location: media/audio/
8) In an audio generation, it tries to save the xxx.wav file in /audio/videos/xxx.wav.
Since it is not present, create the folder named "videos" in /media/audio

# Setup Google service accounts
9) You need to set up the Google API services because GoogleSpeechRecognition.py uses two APIs: Speech to Text and Storage API
See these :
https://www.youtube.com/watch?v=DtlJH6MgBso
https://www.youtube.com/watch?v=pEbL_TT9cHg

# Create a bucket in your Storage account before executing
10) This assumes that a storage bucket is already created with the name "software_engineering_project". Modify this with a unique name.
For example: GOOGLE_CLOUD_BUCKET_NAME = "nt_software_engineering_project" (See SpeechRecognitionConfig.py)
11) Set the environment variable for credentials so that the google python client is able to locate your JSON key
Example: set GOOGLE_APPLICATION_CREDENTIALS=[PATH TO JSON]