Downloads · 30 days
13
30% of all-time downloads
ryota-komatsu/hubert
hubert is a machine learning model from ryota-komatsu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
- Model type: Hubert-Base - Language(s) (NLP): English - License: MIT
Downloads · 30 days
13
30% of all-time downloads
All-time downloads
44
Public
Parameters
107M
428 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors428 MB · 100%
How the weights are stored.
F32107M · 100%
From the Hugging Face model README
Use the code below to get started with the model.
sudo apt install git-lfs # for UTMOS
conda create -y -n py310 -c pytorch -c nvidia -c conda-forge python=3.10.18 pip=24.0 faiss-gpu=1.12.0
conda activate py310
pip install -r requirements/requirements.txt
sh scripts/setup.sh
import torchaudio
from src.s5hubert import S5HubertForSyllableDiscovery
wav_path = "/path/to/wav"
# download pretrained models from hugging face hub
encoder = S5HubertForSyllableDiscovery.from_pretrained("ryota-komatsu/hubert", device_map="cuda")
# load a waveform
waveform, sr = torchaudio.load(wav_path)
waveform = torchaudio.functional.resample(waveform, sr, 16000)
# encode a waveform into syllabic units
outputs = encoder(waveform.to(encoder.device))
units = outputs[0]["units"] # [3950, 67, ..., 503]