-
Notifications
You must be signed in to change notification settings - Fork 0
/
process_transcripts.py
24 lines (19 loc) · 1.14 KB
/
process_transcripts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from modules import s3upload, s3transcribe, parse
import argparse
if __name__ == "__main__":
# Create Argument Parser
parser = argparse.ArgumentParser(description='Process video, create transcripts, proofread with OpenAI GPT.')
parser.add_argument('input_folder', type=str, help='Input folder with .mp4 interview video(s)')
parser.add_argument('s3_folder', type=str, help='Output folder name to save files to in S3 bucket')
args = parser.parse_args()
# Step 1: Upload videos to S3
print("Step 1: Uploading videos to S3...")
s3upload.upload_to_s3(args.input_folder, args.s3_folder)
# Step 2: Transcribe videos from S3 and download the transcriptions
print("Step 2: Transcribing videos from S3 and downloading the transcriptions...")
transcribe_folder = s3transcribe.transcribe_from_s3(args.s3_folder)
s3transcribe.download_transcripts(transcribe_folder)
# Step 3: Parse transcriptions
print("Step 3: Parsing and proofreading transcriptions...")
parse.proofread_transcripts(transcribe_folder)
print("Finished processing videos! View the resulting transcript and .docx file in the timestamped folder.")