Spaces:
Sleeping
Sleeping
Download vencoder/encoder.py from Asankilp/sovits-gochiusa-webui: direct link, hf CLI and curl.
- Browser
- Download file 370 Bytes
-
https://huggingface.co/spaces/Asankilp/sovits-gochiusa-webui/resolve/main/vencoder/encoder.py
- Command line
-
hf download hf://spaces/Asankilp/sovits-gochiusa-webui/vencoder/encoder.py
-
curl -L -o encoder.py https://huggingface.co/spaces/Asankilp/sovits-gochiusa-webui/resolve/main/vencoder/encoder.py
370 Bytes
| class SpeechEncoder(object): | |
| def __init__(self,vec_path = "pretrain/checkpoint_best_legacy_500.pt",device=None): | |
| self.model = None #This is Model | |
| self.hidden_dim = 768 | |
| pass | |
| def encoder(self,wav): | |
| ''' | |
| input: wav:[batchsize,signal_length] | |
| output: embedding:[batchsize,wav_frame,hidden_dim] | |
| ''' | |
| pass |