OthmaneLKH commited on
Commit
7e64f0d
1 Parent(s): 6c881fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -20,6 +20,7 @@ from concrete.ml.deployment import FHEModelClient
20
  from models.speech_to_text import *
21
  from models.speech_to_text.transcriber.audio import preprocess_audio
22
  from models.speech_to_text.transcriber.model import load_model_and_processor
 
23
 
24
 
25
  # Ensure the directory is clean before starting processes or reading files
@@ -473,7 +474,7 @@ def check_btn(btn):
473
 
474
  def transcribe():
475
  return 'Success'
476
-
477
  def transcribe_audio(audio_path):
478
  # Prétraitement de l'audio
479
  audio = preprocess_audio(audio_path)
@@ -482,10 +483,10 @@ def transcribe_audio(audio_path):
482
  model = load_model_and_processor(model_name="openai/whisper-base")
483
 
484
  # Transcription
485
- transcription = model.transcribe(audio)
486
 
487
  return transcription
488
-
489
 
490
  demo = gr.Blocks(css=".markdown-body { font-size: 18px; }")
491
 
 
20
  from models.speech_to_text import *
21
  from models.speech_to_text.transcriber.audio import preprocess_audio
22
  from models.speech_to_text.transcriber.model import load_model_and_processor
23
+ from models.speech_to_text.transcriber.audio import transcribe_audio
24
 
25
 
26
  # Ensure the directory is clean before starting processes or reading files
 
474
 
475
  def transcribe():
476
  return 'Success'
477
+ """
478
  def transcribe_audio(audio_path):
479
  # Prétraitement de l'audio
480
  audio = preprocess_audio(audio_path)
 
483
  model = load_model_and_processor(model_name="openai/whisper-base")
484
 
485
  # Transcription
486
+ transcription = transcribe_audio(model,audio)
487
 
488
  return transcription
489
+ """
490
 
491
  demo = gr.Blocks(css=".markdown-body { font-size: 18px; }")
492