Skip to content

Commit

Permalink
Adding logging to url download case (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Oct 8, 2024
1 parent d97d77d commit 3b76b42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buzz/transcriber/file_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def run(self):
)

try:
logging.debug(f"Downloading audio file from URL: {self.transcription_task.url}")
ydl.download([self.transcription_task.url])
except DownloadError as exc:
logging.debug(f"Error downloading audio: {exc.msg}")
self.error.emit(exc.msg)
return

self.transcription_task.file_path = temp_output_path + ".wav"
logging.debug(f"Downloaded audio to file: {self.transcription_task.file_path}")

try:
segments = self.transcribe()
Expand Down

0 comments on commit 3b76b42

Please sign in to comment.