Skip to content

Is it possible to load a model 100% offline using EncoderClassifier.from_hparams? #2481

Closed Answered by silvioprog
silvioprog asked this question in Q&A
Discussion options

You must be logged in to vote

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])

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by silvioprog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant