huedaya commited on
Commit
b5f4a75
·
1 Parent(s): a7c2026
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,7 +12,7 @@ from datasets import load_dataset
12
  model = whisper.load_model("small")
13
  pipe = pipeline(
14
  "automatic-speech-recognition",
15
- model=model,
16
  chunk_length_s=15,
17
  device=model.device,
18
  )
@@ -53,6 +53,7 @@ def runApi():
53
  options = whisper.DecodingOptions(fp16 = False)
54
  result = whisper.decode(model, mel, options)
55
 
 
56
  ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
57
  sample = ds[0]["audio"]
58
  prediction = pipe(sample.copy())["text"]
 
12
  model = whisper.load_model("small")
13
  pipe = pipeline(
14
  "automatic-speech-recognition",
15
+ model="openai/whisper-small.en",
16
  chunk_length_s=15,
17
  device=model.device,
18
  )
 
53
  options = whisper.DecodingOptions(fp16 = False)
54
  result = whisper.decode(model, mel, options)
55
 
56
+ # test 2
57
  ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
58
  sample = ds[0]["audio"]
59
  prediction = pipe(sample.copy())["text"]