Commit
·
fecb430
1
Parent(s):
1fef18e
Update README.md
Browse files
README.md
CHANGED
|
@@ -61,8 +61,13 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
| 61 |
```python
|
| 62 |
import torchaudio
|
| 63 |
from speechbrain.pretrained import EncoderClassifier
|
| 64 |
-
classifier = EncoderClassifier.from_hparams(source="speechbrain/
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
print(text_lab)
|
| 67 |
```
|
| 68 |
|
|
|
|
| 61 |
```python
|
| 62 |
import torchaudio
|
| 63 |
from speechbrain.pretrained import EncoderClassifier
|
| 64 |
+
classifier = EncoderClassifier.from_hparams(source="speechbrain/lang-id-commonlanguage_ecapa", savedir="pretrained_models/lang-id-commonlanguage_ecapa")
|
| 65 |
+
# Italian Example
|
| 66 |
+
out_prob, score, index, text_lab = classifier.classify_file('speechbrain/lang-id-commonlanguage_ecapa/example-it.wav')
|
| 67 |
+
print(text_lab)
|
| 68 |
+
|
| 69 |
+
# French Example
|
| 70 |
+
out_prob, score, index, text_lab = classifier.classify_file('speechbrain/lang-id-commonlanguage_ecapa/example-fr.wav')
|
| 71 |
print(text_lab)
|
| 72 |
```
|
| 73 |
|