Daniel Amendoeira commited on
Commit
66051de
·
verified ·
1 Parent(s): 104dc35

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +1 -1
tools.py CHANGED
@@ -70,7 +70,7 @@ def transcribe_audio(audio_input: str) -> str:
70
 
71
  # Transcribing audio using OpenAI Whisper
72
  client = OpenAI()
73
- with open(file_path, "rb") as audio_file: # opens the audio file from disk in binary mode (rb); the "with" block ensures the file is automatically closed afterward
74
  transcription = client.audio.transcriptions.create(
75
  model="whisper-1",
76
  file=audio_file
 
70
 
71
  # Transcribing audio using OpenAI Whisper
72
  client = OpenAI()
73
+ with open(file_path, "rb") as audio_file: # opens the audio file from disk in binary mode (rb); the "with" block ensures the file is automatically closed afterward
74
  transcription = client.audio.transcriptions.create(
75
  model="whisper-1",
76
  file=audio_file