Update pages/02_Take_Interview.py
Browse files
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 |
-
|
| 58 |
model="whisper-1",
|
| 59 |
file=audio_file
|
| 60 |
)
|
| 61 |
-
return
|
| 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):
|