patrickvonplaten commited on
Commit
f738f98
1 Parent(s): d54029d
hf_whisper_meanwhile.py CHANGED
@@ -42,18 +42,14 @@ for audio, label in zip(audios, labels):
42
  if inputs["input_features"].shape[-1] < 3000:
43
  continue
44
 
45
- result = model_orig.transcribe(audio.astype(dtype=np.float32), condition_on_previous_text=DO_COND, temperature=0.0, logprob_threshold=None, compression_ratio_threshold=None, no_speech_threshold=None)
46
 
47
  gen_length = 448
48
  result_hf = model.generate(**inputs, condition_on_prev_tokens=DO_COND, max_new_tokens=gen_length, return_timestamps=True)
49
  decoded = processor.batch_decode(result_hf, skip_special_tokens=True)
50
 
51
- # result = model.generate(**inputs, condition_on_previous_tokens=False, max_new_tokens=gen_length, return_timestamps=True)
52
- # decoded_2 = processor.batch_decode(result)
53
- # print(50 * "-")
54
 
55
- # result_2 = model_orig.transcribe(audio.astype(dtype=np.float32), condition_on_previous_text=False, temperature=0.0, logprob_threshold=None, compression_ratio_threshold=None, no_speech_threshold=None)
56
-
57
  result_text_norm = processor.tokenizer._normalize(result["text"])
58
  decoded_norm = processor.tokenizer._normalize(decoded[0])
59
  label_norm = processor.tokenizer._normalize(label)
 
42
  if inputs["input_features"].shape[-1] < 3000:
43
  continue
44
 
45
+ # result = model_orig.transcribe(audio.astype(dtype=np.float32), condition_on_previous_text=DO_COND, temperature=0.0, logprob_threshold=None, compression_ratio_threshold=None, no_speech_threshold=None)
46
 
47
  gen_length = 448
48
  result_hf = model.generate(**inputs, condition_on_prev_tokens=DO_COND, max_new_tokens=gen_length, return_timestamps=True)
49
  decoded = processor.batch_decode(result_hf, skip_special_tokens=True)
50
 
51
+ result = model.generate(**inputs, condition_on_previous_tokens=False, max_new_tokens=gen_length, return_timestamps=True)
 
 
52
 
 
 
53
  result_text_norm = processor.tokenizer._normalize(result["text"])
54
  decoded_norm = processor.tokenizer._normalize(decoded[0])
55
  label_norm = processor.tokenizer._normalize(label)
results_wer.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Let's go----------------------------------------Result--------------------WER Orig 0.21507821025827573WER HF 0.17915605674790833--------------------Result--------------------WER Orig 0.6195727084769125WER HF 0.9187752289061731--------------------Result--------------------WER Orig 0.13312024879060125WER HF 0.45084657912923287--------------------Result--------------------WER Orig 0.12349021241149521WER HF 0.6365056226572262--------------------Result--------------------WER Orig 0.12877416896847318WER HF 0.1275359558053148--------------------Result--------------------WER Orig 0.10976753883039717WER HF 0.11404148858542687--------------------Result--------------------WER Orig 0.25127989928661354WER HF 1.014771296684851--------------------Result--------------------WER Orig 0.19159192825112106WER HF 0.7798206278026906--------------------Result--------------------WER Orig 0.9064796760161992WER HF 0.24501274936253187--------------------Result--------------------WER Orig 1.130976879312432WER HF 0.9656215954484929--------------------Result--------------------WER Orig 0.1416774193548387WER HF 1.4580645161290322--------------------Result--------------------WER Orig 0.0847735399284863WER HF 0.08089988081048868--------------------Result--------------------WER Orig 0.09991017067571614WER HF 0.09392154905679209--------------------Result--------------------WER Orig 0.11784363732301469WER HF 0.12839679887432942--------------------Result--------------------WER Orig 0.10688317983519147WER HF 1.1936500242365486--------------------Result--------------------WER Orig 0.14650474855986298WER HF 0.15600186828584772--------------------Result--------------------WER Orig 0.1053972666203382WER HF 0.11373639101227705--------------------Result--------------------WER Orig 0.1661609593989308WER HF 0.16847276405143766--------------------Result--------------------WER Orig 0.33668834060746416WER HF 0.18117039280306405--------------------Result--------------------WER Orig 1.1311309282529387WER HF 0.0899878394811512
results_wer_fp32.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Let's go----------------------------------------Result--------------------WER Orig 0.21507821025827573WER HF 0.17915605674790833--------------------Result--------------------WER Orig 0.6195727084769125WER HF 0.9171015063503003--------------------Result--------------------WER Orig 0.13312024879060125WER HF 0.28757774706288874--------------------Result--------------------WER Orig 0.12349021241149521WER HF 0.1284881299458559--------------------Result--------------------WER Orig 0.12877416896847318WER HF 0.1259167539765692--------------------Result--------------------WER Orig 0.10976753883039717WER HF 0.11018450953820494--------------------Result--------------------WER Orig 0.25127989928661354WER HF 0.7165757448594209--------------------Result--------------------WER Orig 0.19159192825112106WER HF 0.8649103139013453--------------------Result--------------------WER Orig 0.9064796760161992WER HF 2.629668516574171--------------------Result--------------------WER Orig 1.130976879312432WER HF 0.9661057983295--------------------Result--------------------WER Orig 0.1416774193548387WER HF 1.4575483870967743--------------------Result--------------------WER Orig 0.0847735399284863WER HF 0.08164481525625746--------------------Result--------------------WER Orig 0.09991017067571614WER HF 0.09721529094720031--------------------Result--------------------WER Orig 0.11784363732301469WER HF 0.12197695893061296--------------------Result--------------------WER Orig 0.10688317983519147WER HF 1.1931652932622394--------------------Result--------------------WER Orig 0.14650474855986298WER HF 0.15584617779853652--------------------Result--------------------WER Orig 0.1053972666203382WER HF 0.11049339819318972--------------------Result--------------------WER Orig 0.1661609593989308WER HF 0.1668833983528392--------------------Result--------------------WER Orig 0.33668834060746416WER HF 0.4192571479469137--------------------Result--------------------WER Orig 1.1311309282529387WER HF 0.09100121605188488