Building model to work on local system to work in offline mode.

#3
by lazarus0025 - opened

Good Morning,
Hey, I am quite newbie in Hugging face community. I am trying to build https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa for Spoken Language Identification task. I have searched for several ways to find how to build this model locally but I couldn't find any concrete answer. I am trying this building from last 1 month but every time I got failed. Please help me to know how build this model locally on machine and use it without using internet.

SpeechBrain org

Hello @lazarus0025 ,

You can use git to clone this model with git lfs (See HuggingFace documentation), and then, you will be able with our interface EncoderClassifier to fetch the model that you have download locally just by giving the path of the clone model. Or, you can just use the snippet of code provided in the README.md that will automatically download the model, and store it at the desired location. And then, every time you will run your snippet of code it will first check if the model is already stored locally and if so, it will use it instead of relying on internet.

Adel

Hello @Adel-Moumen

I just want to know that I am trying to extract a embedding model of this model repository. For this I have used ECPA-TDNN script written in speechbrain library https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/lobes/models/ECAPA_TDNN.py and then loading the embedding.ckpt model weights into a file.All ran successfully but for different audio files it generates a same embedding every time. I also want to ask how preprocessing is done in this model like only Fbank with 60 mels is used or any other. Embedding generating from embedding.ckpt file and encode_batch function are totally different. Please tell me is there any way to generate a same embedding using embedding.ckpt file.

Process: I have used speechbrain/lobes/model/ECPA-TDNN script, make a object of whole model and then load the weights and extracted embedding. Please guide me sir. I will be highly obiligd to you for this act of kindness.

Sign up or log in to comment