karthigrj commited on
Commit
2152918
·
verified ·
1 Parent(s): 6019bed

Update pages/02_Take_Interview.py

Browse files
Files changed (1) hide show
  1. pages/02_Take_Interview.py +2 -2
pages/02_Take_Interview.py CHANGED
@@ -54,11 +54,11 @@ def save_audio_file(audio_bytes, file_extension="wav"):
54
  # Function to transcribe audio using Whisper API
55
  def transcribe_audio(file_path):
56
  with open(file_path, "rb") as audio_file:
57
- response = openai.Audio.transcriptions.create(
58
  model="whisper-1",
59
  file=audio_file
60
  )
61
- return response["text"]
62
 
63
  # Function to analyze the transcribed response
64
  def analyze_response(transcript):
 
54
  # Function to transcribe audio using Whisper API
55
  def transcribe_audio(file_path):
56
  with open(file_path, "rb") as audio_file:
57
+ transcription = client.audio.transcriptions.create(
58
  model="whisper-1",
59
  file=audio_file
60
  )
61
+ return transcription.text
62
 
63
  # Function to analyze the transcribed response
64
  def analyze_response(transcript):