Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,11 +19,11 @@ genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
|
19 |
|
20 |
|
21 |
# Load the Whisper model
|
22 |
-
|
23 |
|
24 |
def speech_to_text(audio_path):
|
25 |
# Load and decode the audio file
|
26 |
-
result =
|
27 |
return result['text']
|
28 |
|
29 |
|
|
|
19 |
|
20 |
|
21 |
# Load the Whisper model
|
22 |
+
model_1 = whisper.load_model("large")
|
23 |
|
24 |
def speech_to_text(audio_path):
|
25 |
# Load and decode the audio file
|
26 |
+
result = model_1.transcribe(audio_path, language="en",fp16=False)
|
27 |
return result['text']
|
28 |
|
29 |
|