Run this model with HF Jobs
Run microsoft/wavlm-base-sd on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/microsoft/wavlm-base-sd. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/microsoft/wavlm-base-sd on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use microsoft/wavlm-base-sd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/wavlm-base-sd with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForAudioFrameClassification processor = AutoProcessor.from_pretrained("microsoft/wavlm-base-sd") model = AutoModelForAudioFrameClassification.from_pretrained("microsoft/wavlm-base-sd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files31 unmodified lines3233343536373839404142434431 unmodified linesfrom transformers import Wav2Vec2FeatureExtractor, UniSpeechSatForAudioFrameClassificationfrom datasets import load_datasetimport torchdataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained('microsoft/wavlm-base-sd')model = UniSpeechSatForAudioFrameClassification.from_pretrained('microsoft/wavlm-base-sd')# audio file is decoded on the flyinputs = feature_extractor(dataset[0]["audio"]["array"], return_tensors="pt")logits = model(**inputs).logitsprobabilities = torch.sigmoid(logits[0])# labels is a one-hot array of shape (num_frames, num_speakers)labels = (probabilities > 0.5).long()```31 unmodified lines3233343536373839404142434445464731 unmodified linesfrom transformers import Wav2Vec2FeatureExtractor, UniSpeechSatForAudioFrameClassificationfrom datasets import load_datasetimport torchdataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained('microsoft/wavlm-base-sd')model = UniSpeechSatForAudioFrameClassification.from_pretrained('microsoft/wavlm-base-sd')# audio file is decoded on the flyinputs = feature_extractor(dataset[0]["audio"]["array"], return_tensors="pt")logits = model(**inputs).logitsprobabilities = torch.sigmoid(logits[0])# labels is a one-hot array of shape (num_frames, num_speakers)labels = (probabilities > 0.5).long()```
README.md+3