From 3eca20c015b18c7da4128ffd93f0388feed06136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Cla=C3=9Fen?= Date: Sat, 6 Jan 2024 07:05:03 +0100 Subject: [PATCH] Typo fixed in variable names (#5184) --- extensions/openai/script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/openai/script.py b/extensions/openai/script.py index 0be83442..e8647357 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -174,13 +174,13 @@ async def handle_audio_transcription(request: Request): # Create AudioData object audio_data = sr.AudioData(raw_data, audio_data.frame_rate, audio_data.sample_width) - whipser_language = form.getvalue('language', None) - whipser_model = form.getvalue('model', 'tiny') # Use the model from the form data if it exists, otherwise default to tiny + whisper_language = form.getvalue('language', None) + whisper_model = form.getvalue('model', 'tiny') # Use the model from the form data if it exists, otherwise default to tiny transcription = {"text": ""} try: - transcription["text"] = r.recognize_whisper(audio_data, language=whipser_language, model=whipser_model) + transcription["text"] = r.recognize_whisper(audio_data, language=whisper_language, model=whisper_model) except sr.UnknownValueError: print("Whisper could not understand audio") transcription["text"] = "Whisper could not understand audio UnknownValueError"