File size: 519 Bytes
5f7e788
 
37f94c5
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
license: mit
---

```python
from transformers import WhisperFeatureExtractor
from transformers.models.whisper.modeling_whisper import WhisperEncoder

feature_extractor = WhisperFeatureExtractor.from_pretrained("techintermezzo/whisper-encoder-medium")
model = WhisperEncoder.from_pretrained("techintermezzo/whisper-encoder-medium").half()
model.eval()

input_features = feature_extractor(inputs, sampling_rate=16000, return_tensors="pt").input_features
last_hidden_state = model(input_features).last_hidden_state
```