jlsotoh commited on
Commit
e8c8755
1 Parent(s): d715d72

update app

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -10,10 +10,9 @@ import warnings
10
  warnings.filterwarnings("ignore")
11
 
12
  secret_token = "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"
 
 
13
 
14
- model = whisper.load_model("base")
15
-
16
- model.device
17
 
18
  """Transcribe function"""
19
 
@@ -31,10 +30,10 @@ def transcribe(audio):
31
  _, probs = model.detect_language(mel)
32
 
33
  # decode the audio
34
- options = whisper.DecodingOptions()
35
  result = whisper.decode(model, mel, options)
36
 
37
- print(str(result))
38
  result_text = result.text
39
 
40
  # Pass the generated text to audio
 
10
  warnings.filterwarnings("ignore")
11
 
12
  secret_token = "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"
13
+
14
+ model = whisper.load_model("small")
15
 
 
 
 
16
 
17
  """Transcribe function"""
18
 
 
30
  _, probs = model.detect_language(mel)
31
 
32
  # decode the audio
33
+ options = whisper.DecodingOptions(fp16=False)
34
  result = whisper.decode(model, mel, options)
35
 
36
+ print(result.text)
37
  result_text = result.text
38
 
39
  # Pass the generated text to audio