TechInterMezzo commited on
Commit
37f94c5
·
1 Parent(s): e36478e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -1
README.md CHANGED
@@ -1,3 +1,15 @@
1
  ---
2
  license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ ---
4
+
5
+ ```python
6
+ from transformers import WhisperFeatureExtractor
7
+ from transformers.models.whisper.modeling_whisper import WhisperEncoder
8
+
9
+ feature_extractor = WhisperFeatureExtractor.from_pretrained("techintermezzo/whisper-encoder-medium")
10
+ model = WhisperEncoder.from_pretrained("techintermezzo/whisper-encoder-medium").half()
11
+ model.eval()
12
+
13
+ input_features = feature_extractor(inputs, sampling_rate=16000, return_tensors="pt").input_features
14
+ last_hidden_state = model(input_features).last_hidden_state
15
+ ```