Update README.md
Browse files
README.md
CHANGED
@@ -145,11 +145,9 @@ information about the dataset, see [here](http://bark.phon.ioc.ee/voxlingua107/)
|
|
145 |
import torchaudio
|
146 |
from speechbrain.pretrained import EncoderClassifier
|
147 |
language_id = EncoderClassifier.from_hparams(source="TalTechNLP/voxlingua107-epaca-tdnn", savedir="tmp")
|
148 |
-
# Download Thai language sample from Omniglot
|
149 |
-
signal
|
150 |
-
|
151 |
-
signal_resampled = torchaudio.transforms.Resample(fs, 16000)(signal)[0]
|
152 |
-
prediction = language_id.classify_batch(signal_resampled)
|
153 |
print(prediction)
|
154 |
(tensor([[0.3210, 0.3751, 0.3680, 0.3939, 0.4026, 0.3644, 0.3689, 0.3597, 0.3508,
|
155 |
0.3666, 0.3895, 0.3978, 0.3848, 0.3957, 0.3949, 0.3586, 0.4360, 0.3997,
|
@@ -210,7 +208,7 @@ Error rate: 7% on the development dataset
|
|
210 |
```bibtex
|
211 |
@inproceedings{valk2021slt,
|
212 |
title={{VoxLingua107}: a Dataset for Spoken Language Recognition},
|
213 |
-
author={J{
|
214 |
booktitle={Proc. IEEE SLT Workshop},
|
215 |
year={2021},
|
216 |
}
|
|
|
145 |
import torchaudio
|
146 |
from speechbrain.pretrained import EncoderClassifier
|
147 |
language_id = EncoderClassifier.from_hparams(source="TalTechNLP/voxlingua107-epaca-tdnn", savedir="tmp")
|
148 |
+
# Download Thai language sample from Omniglot and cvert to suitable form
|
149 |
+
signal = language_id.load_audio("https://omniglot.com/soundfiles/udhr/udhr_th.mp3")
|
150 |
+
prediction = language_id.classify_batch(signal)
|
|
|
|
|
151 |
print(prediction)
|
152 |
(tensor([[0.3210, 0.3751, 0.3680, 0.3939, 0.4026, 0.3644, 0.3689, 0.3597, 0.3508,
|
153 |
0.3666, 0.3895, 0.3978, 0.3848, 0.3957, 0.3949, 0.3586, 0.4360, 0.3997,
|
|
|
208 |
```bibtex
|
209 |
@inproceedings{valk2021slt,
|
210 |
title={{VoxLingua107}: a Dataset for Spoken Language Recognition},
|
211 |
+
author={J{\\"o}rgen Valk and Tanel Alum{\\"a}e},
|
212 |
booktitle={Proc. IEEE SLT Workshop},
|
213 |
year={2021},
|
214 |
}
|