Skip to content

Commit f52f57a

Browse files
committed
json dumps dict
1 parent 43d24a9 commit f52f57a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/models/meeting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Meeting(Dyntastic):
2626
duration: str = Field(description="Duration of the meeting")
2727
agenda: Optional[HttpUrl] = Field(None, description="URL to the meeting agenda")
2828
video: Optional[HttpUrl] = Field(None, description="URL to the meeting video")
29-
transcripts: Optional[List[HttpUrl]] = Field(
29+
transcripts: Optional[List[str]] = Field(
3030
None, description="URLs to the meeting transcripts"
3131
)
3232
subtitles: Optional[List[HttpUrl]] = Field(

src/run_diarization.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import os
3+
import json
34

45
from pathlib import Path
56

@@ -45,8 +46,10 @@ def run_diarization(video_file: Path, meeting: Meeting):
4546
transcribe_video_with_diarization(video_file, transcription_dir)
4647
)
4748
# Add transcript to S3
49+
# Convert dictionary to JSON string before saving
50+
transcription_json = json.dumps(transcription, indent=2, ensure_ascii=False)
4851
save_content_to_s3(
49-
transcription,
52+
transcription_json,
5053
BUCKET_NAME,
5154
f"{FOLDER_NAME}/{video_file.name}.json",
5255
"application/json",

0 commit comments

Comments
 (0)