Update README.md
Browse files
README.md
CHANGED
@@ -164,7 +164,7 @@ language_id = EncoderClassifier.from_hparams(source="speechbrain/lang-id-voxling
|
|
164 |
signal = language_id.load_audio("https://omniglot.com/soundfiles/udhr/udhr_th.mp3")
|
165 |
prediction = language_id.classify_batch(signal)
|
166 |
print(prediction)
|
167 |
-
(tensor([[-2.8646e+01, -3.0346e+01, -2.0748e+01, -2.9562e+01, -2.2187e+01,
|
168 |
-3.2668e+01, -3.6677e+01, -3.3573e+01, -3.2545e+01, -2.4365e+01,
|
169 |
-2.4688e+01, -3.1171e+01, -2.7743e+01, -2.9918e+01, -2.4770e+01,
|
170 |
-3.2250e+01, -2.4727e+01, -2.6087e+01, -2.1870e+01, -3.2821e+01,
|
@@ -190,10 +190,10 @@ print(prediction)
|
|
190 |
# the given utterance belongs to the given language (i.e., the larger the better)
|
191 |
# The linear-scale likelihood can be retrieved using the following:
|
192 |
print(prediction[1].exp())
|
193 |
-
tensor([0.9850])
|
194 |
# The identified language ISO code is given in prediction[3]
|
195 |
print(prediction[3])
|
196 |
-
['th: Thai']
|
197 |
|
198 |
# Alternatively, use the utterance embedding extractor:
|
199 |
emb = language_id.encode_batch(signal)
|
|
|
164 |
signal = language_id.load_audio("https://omniglot.com/soundfiles/udhr/udhr_th.mp3")
|
165 |
prediction = language_id.classify_batch(signal)
|
166 |
print(prediction)
|
167 |
+
# (tensor([[-2.8646e+01, -3.0346e+01, -2.0748e+01, -2.9562e+01, -2.2187e+01,
|
168 |
-3.2668e+01, -3.6677e+01, -3.3573e+01, -3.2545e+01, -2.4365e+01,
|
169 |
-2.4688e+01, -3.1171e+01, -2.7743e+01, -2.9918e+01, -2.4770e+01,
|
170 |
-3.2250e+01, -2.4727e+01, -2.6087e+01, -2.1870e+01, -3.2821e+01,
|
|
|
190 |
# the given utterance belongs to the given language (i.e., the larger the better)
|
191 |
# The linear-scale likelihood can be retrieved using the following:
|
192 |
print(prediction[1].exp())
|
193 |
+
# tensor([0.9850])
|
194 |
# The identified language ISO code is given in prediction[3]
|
195 |
print(prediction[3])
|
196 |
+
# ['th: Thai']
|
197 |
|
198 |
# Alternatively, use the utterance embedding extractor:
|
199 |
emb = language_id.encode_batch(signal)
|