Update README.md
Browse files
README.md
CHANGED
@@ -28,4 +28,11 @@ In training of the model, we used the following data sources:
|
|
28 |
|
29 |
## Usage
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
## Usage
|
30 |
|
31 |
+
```python
|
32 |
+
from speechbrain.inference.interfaces import foreign_class
|
33 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
34 |
+
asr_classifier = foreign_class(source="Macedonian-ASR/wav2vec2-aed-macedonian-asr", pymodule_file="custom_interface.py", classname="ASR")
|
35 |
+
asr_classifier = asr_classifier.to(device)
|
36 |
+
predictions = asr_classifier.classify_file("audio_file.wav", device)
|
37 |
+
print(predictions)
|
38 |
+
```
|