Views
No views yet
1from transformers import WavLMModel
2import torch
3
4model = WavLMModel.from_pretrained("kdrkdrkdr/wavlm_l3")
5model.eval()
6
7# Input: mono 16 kHz waveform, shape [B, T]
8wav = torch.randn(1, 16000 * 5) # 5-second clip
9with torch.no_grad():
10 out = model(wav, output_hidden_states=True)
11features = out.hidden_states[3] # layer-3 output, [B, T_frames, 1024]% (paper bibtex placeholder; will be filled after publication)1@article{chen2022wavlm,
2 title={WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing},
3 author={Chen, Sanyuan and Wang, Chengyi and Chen, Zhengyang and others},
4 journal={IEEE Journal of Selected Topics in Signal Processing},
5 year={2022},
6}