Audio Classification
speechbrain
PyTorch
embeddings
Language
Identification
ECAPA-TDNN
TDNN
CommonLanguage
Instructions to use speechbrain/lang-id-commonlanguage_ecapa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- speechbrain
How to use speechbrain/lang-id-commonlanguage_ecapa with speechbrain:
from speechbrain.pretrained import EncoderClassifier model = EncoderClassifier.from_hparams( "speechbrain/lang-id-commonlanguage_ecapa" ) model.classify_file("file.wav") - Notebooks
- Google Colab
- Kaggle
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 |
|