Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from md2pdf.core import md2pdf
from dotenv import load_dotenv
from download import download_video_audio, delete_download
import pyobjc

load_dotenv()

Expand Down Expand Up @@ -167,6 +168,7 @@ def create_pdf_file(content: str):
pdf_buffer.seek(0)
return pdf_buffer

@pyobjc.background_task
def transcribe_audio(audio_file):
"""
Transcribes audio using Groq's Whisper API.
Expand Down Expand Up @@ -499,4 +501,4 @@ def stream_section_content(sections):

# Remove audio after exception to prevent data storage leak
if audio_file_path is not None:
delete_download(audio_file_path)
delete_download(audio_file_path)
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ webencodings==0.5.1
websockets
yt-dlp @ https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
zopfli==0.2.3
pyobjc==8.5
groq-whisper==0.1.0