Is it possible to load a model 100% offline using EncoderClassifier.from_hparams? #2481
-
Hi. I have an environment with zero internet access, so any model must be loaded offline from a sdcard. So, is it possible to load for example the model from speechbrain.inference.classifiers import EncoderClassifier
language_id = EncoderClassifier.from_hparams(
source="/path/with/the/model/lang-id-voxlingua107-ecapa"
) TIA for any help! |
Beta Was this translation helpful? Give feedback.
Answered by
silvioprog
Apr 1, 2024
Replies: 1 comment
-
I have just solved using this: from speechbrain.inference.classifiers import EncoderClassifier
hparams_file = '/path/with/the/model/lang-id-voxlingua107-ecapa/hyperparams.yaml'
saved_model_dir = '/path/with/the/model/lang-id-voxlingua107-ecapa'
classifier = EncoderClassifier.from_hparams(source=hparams_file, savedir=saved_model_dir)
predictions = classifier.classify_file("~/audio.wav")
print(predictions[3]) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
silvioprog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have just solved using this: