Neura commited on
Commit
65a2cf9
1 Parent(s): 790c92d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -0
README.md CHANGED
@@ -66,6 +66,13 @@ array = librosa.to_mono(array)
66
  array = librosa.resample(array, orig_sr=sample_rate, target_sr=16000)
67
  input_features = processor(array, sampling_rate=sr, return_tensors="pt").input_features
68
 
 
 
 
 
 
 
 
69
  ```
70
  trascribed text :
71
  ```
 
66
  array = librosa.resample(array, orig_sr=sample_rate, target_sr=16000)
67
  input_features = processor(array, sampling_rate=sr, return_tensors="pt").input_features
68
 
69
+ # generate token ids
70
+ predicted_ids = model.generate(input_features)
71
+ # decode token ids to text
72
+ transcription = processor.batch_decode(predicted_ids,)
73
+ transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
74
+ print(transcription)
75
+
76
  ```
77
  trascribed text :
78
  ```