import{S as vl,i as bl,s as wl,e as n,k as h,w,t as i,M as yl,c as s,d as o,m as u,a as r,x as y,h as l,b as c,G as e,g as _,y as M,q as k,o as $,B as L,v as Ml,L as Ot}from"../../chunks/vendor-hf-doc-builder.js";import{T as oa}from"../../chunks/Tip-hf-doc-builder.js";import{D as X}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Vt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ce}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Dt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function kl(W){let d,b,f,m,v;return m=new Vt({props:{code:"",highlighted:""}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function $l(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import WavLMConfig, WavLMModel

# Initializing a WavLM facebook/wavlm-base-960h style configuration
configuration = WavLMConfig()

# Initializing a model (with random weights) from the facebook/wavlm-base-960h style configuration
model = WavLMModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> WavLMConfig, WavLMModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a WavLM facebook/wavlm-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = WavLMConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/wavlm-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function Ll(W){let d,b,f,m,v;return{c(){d=n("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(p,"CODE",{});var T=r(f);m=l(T,"Module"),T.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(a,p){_(a,d,p),e(d,b),e(d,f),e(f,m),e(d,v)},d(a){a&&o(d)}}}function Wl(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import AutoProcessor, WavLMModel
import torch
from datasets import load_dataset

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = AutoProcessor.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")
model = WavLMModel.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")

# audio file is decoded on the fly
inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, WavLMModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMModel.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">292</span>, <span class="hljs-number">768</span>]`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function Tl(W){let d,b,f,m,v;return{c(){d=n("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(p,"CODE",{});var T=r(f);m=l(T,"Module"),T.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(a,p){_(a,d,p),e(d,b),e(d,f),e(f,m),e(d,v)},d(a){a&&o(d)}}}function Cl(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import AutoProcessor, WavLMForCTC
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = AutoProcessor.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")
model = WavLMForCTC.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")

# audio file is decoded on the fly
inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)

# transcribe speech
transcription = processor.batch_decode(predicted_ids)
transcription[0]

inputs["labels"] = processor(text=dataset[0]["text"], return_tensors="pt").input_ids

# compute loss
loss = model(**inputs).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, WavLMForCTC
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMForCTC.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># transcribe speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;mister quilter is the aposle of the middle classes and we are glad to welcome his gospel&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = processor(text=dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">12.51</span>`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function jl(W){let d,b,f,m,v;return{c(){d=n("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(p,"CODE",{});var T=r(f);m=l(T,"Module"),T.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(a,p){_(a,d,p),e(d,b),e(d,f),e(f,m),e(d,v)},d(a){a&&o(d)}}}function Fl(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import AutoFeatureExtractor, WavLMForSequenceClassification
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

feature_extractor = AutoFeatureExtractor.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")
model = WavLMForSequenceClassification.from_pretrained("patrickvonplaten/wavlm-libri-clean-100h-base-plus")

# audio file is decoded on the fly
inputs = feature_extractor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.argmax(logits, dim=-1).item()
predicted_label = model.config.id2label[predicted_class_ids]

# compute loss - target_label is e.g. "down"
target_label = model.config.id2label[0]
inputs["labels"] = torch.tensor([model.config.label2id[target_label]])
loss = model(**inputs).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, WavLMForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/wavlm-libri-clean-100h-base-plus&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss - target_label is e.g. &quot;down&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_label = model.config.id2label[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = torch.tensor([model.config.label2id[target_label]])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function xl(W){let d,b,f,m,v;return{c(){d=n("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(p,"CODE",{});var T=r(f);m=l(T,"Module"),T.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(a,p){_(a,d,p),e(d,b),e(d,f),e(f,m),e(d,v)},d(a){a&&o(d)}}}function ql(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import AutoFeatureExtractor, WavLMForAudioFrameClassification
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/wavlm-base-plus-sd")
model = WavLMForAudioFrameClassification.from_pretrained("microsoft/wavlm-base-plus-sd")

# audio file is decoded on the fly
inputs = feature_extractor(dataset[0]["audio"]["array"], return_tensors="pt", sampling_rate=sampling_rate)
with torch.no_grad():
    logits = model(**inputs).logits

probabilities = torch.sigmoid(logits[0])
# labels is a one-hot array of shape (num_frames, num_speakers)
labels = (probabilities > 0.5).long()
labels[0].tolist()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, WavLMForAudioFrameClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/wavlm-base-plus-sd&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/wavlm-base-plus-sd&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, sampling_rate=sampling_rate)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>probabilities = torch.sigmoid(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># labels is a one-hot array of shape (num_frames, num_speakers)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = (probabilities &gt; <span class="hljs-number">0.5</span>).long()
<span class="hljs-meta">&gt;&gt;&gt; </span>labels[<span class="hljs-number">0</span>].tolist()
[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>]`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function El(W){let d,b,f,m,v;return{c(){d=n("p"),b=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(p,"CODE",{});var T=r(f);m=l(T,"Module"),T.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(a,p){_(a,d,p),e(d,b),e(d,f),e(f,m),e(d,v)},d(a){a&&o(d)}}}function Pl(W){let d,b,f,m,v;return m=new Vt({props:{code:`from transformers import AutoFeatureExtractor, WavLMForXVector
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/wavlm-base-plus-sv")
model = WavLMForXVector.from_pretrained("microsoft/wavlm-base-plus-sv")

# audio file is decoded on the fly
inputs = feature_extractor(
    [d["array"] for d in dataset[:2]["audio"]], sampling_rate=sampling_rate, return_tensors="pt", padding=True
)
with torch.no_grad():
    embeddings = model(**inputs).embeddings

embeddings = torch.nn.functional.normalize(embeddings, dim=-1).cpu()

# the resulting embeddings can be used for cosine similarity-based retrieval
cosine_sim = torch.nn.CosineSimilarity(dim=-1)
similarity = cosine_sim(embeddings[0], embeddings[1])
threshold = 0.7  # the optimal threshold is dataset-dependent
if similarity < threshold:
    print("Speakers are not the same!")
round(similarity.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, WavLMForXVector
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/wavlm-base-plus-sv&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WavLMForXVector.from_pretrained(<span class="hljs-string">&quot;microsoft/wavlm-base-plus-sv&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    [d[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> dataset[:<span class="hljs-number">2</span>][<span class="hljs-string">&quot;audio&quot;</span>]], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    embeddings = model(**inputs).embeddings

<span class="hljs-meta">&gt;&gt;&gt; </span>embeddings = torch.nn.functional.normalize(embeddings, dim=-<span class="hljs-number">1</span>).cpu()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the resulting embeddings can be used for cosine similarity-based retrieval</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.nn.CosineSimilarity(dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>similarity = cosine_sim(embeddings[<span class="hljs-number">0</span>], embeddings[<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>threshold = <span class="hljs-number">0.7</span>  <span class="hljs-comment"># the optimal threshold is dataset-dependent</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> similarity &lt; threshold:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Speakers are not the same!&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(similarity.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.97</span>`}}),{c(){d=n("p"),b=i("Example:"),f=h(),w(m.$$.fragment)},l(a){d=s(a,"P",{});var p=r(d);b=l(p,"Example:"),p.forEach(o),f=u(a),y(m.$$.fragment,a)},m(a,p){_(a,d,p),e(d,b),_(a,f,p),M(m,a,p),v=!0},p:Ot,i(a){v||(k(m.$$.fragment,a),v=!0)},o(a){$(m.$$.fragment,a),v=!1},d(a){a&&o(d),a&&o(f),L(m,a)}}}function Al(W){let d,b,f,m,v,a,p,T,Qa,aa,R,pe,vo,Oe,Ja,bo,Ga,na,me,en,Ve,tn,on,sa,Nt,an,ra,Xt,wo,nn,ia,It,sn,la,I,Ne,rn,Ut,ln,dn,cn,Xe,pn,Yt,mn,hn,un,yo,fn,da,he,gn,Ie,_n,vn,ca,U,bn,Ue,wn,yn,Ye,Mn,kn,pa,B,ue,Mo,He,$n,ko,Ln,ma,fe,$o,Ht,Wn,Tn,Lo,Kt,Cn,ha,Z,ge,Wo,Ke,jn,To,Fn,ua,x,Re,xn,Q,qn,Rt,En,Pn,Be,An,Sn,zn,J,Dn,Bt,On,Vn,Zt,Nn,Xn,In,_e,Un,ve,fa,G,be,Co,Ze,Yn,jo,Hn,ga,q,Qe,Kn,Je,Rn,Ge,Bn,Zn,Qn,et,Jn,Qt,Gn,es,ts,tt,os,ot,as,ns,ss,P,at,rs,ee,is,Jt,ls,ds,Fo,cs,ps,ms,we,hs,ye,_a,te,Me,xo,nt,us,qo,fs,va,E,st,gs,oe,_s,Eo,vs,bs,rt,ws,ys,Ms,it,ks,Gt,$s,Ls,Ws,lt,Ts,dt,Cs,js,Fs,A,ct,xs,ae,qs,eo,Es,Ps,Po,As,Ss,zs,ke,Ds,$e,ba,ne,Le,Ao,pt,Os,So,Vs,wa,C,mt,Ns,zo,Xs,Is,ht,Us,ut,Ys,Hs,Ks,ft,Rs,to,Bs,Zs,Qs,gt,Js,_t,Gs,er,tr,S,vt,or,se,ar,oo,nr,sr,Do,rr,ir,lr,We,dr,Te,ya,re,Ce,Oo,bt,cr,Vo,pr,Ma,j,wt,mr,No,hr,ur,yt,fr,Mt,gr,_r,vr,kt,br,ao,wr,yr,Mr,$t,kr,Lt,$r,Lr,Wr,z,Wt,Tr,ie,Cr,no,jr,Fr,Xo,xr,qr,Er,je,Pr,Fe,ka,le,xe,Io,Tt,Ar,Uo,Sr,$a,F,Ct,zr,Yo,Dr,Or,jt,Vr,Ft,Nr,Xr,Ir,xt,Ur,so,Yr,Hr,Kr,qt,Rr,Et,Br,Zr,Qr,D,Pt,Jr,de,Gr,ro,ei,ti,Ho,oi,ai,ni,qe,si,Ee,La;return a=new ce({}),Oe=new ce({}),He=new ce({}),Ke=new ce({}),Re=new X({props:{name:"class transformers.WavLMConfig",anchor:"transformers.WavLMConfig",parameters:[{name:"vocab_size",val:" = 32"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"feat_proj_dropout",val:" = 0.0"},{name:"final_dropout",val:" = 0.1"},{name:"layerdrop",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"feat_extract_norm",val:" = 'group'"},{name:"feat_extract_activation",val:" = 'gelu'"},{name:"conv_dim",val:" = (512, 512, 512, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 2, 2, 2, 2, 2)"},{name:"conv_kernel",val:" = (10, 3, 3, 3, 3, 2, 2)"},{name:"conv_bias",val:" = False"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"num_buckets",val:" = 320"},{name:"max_bucket_distance",val:" = 800"},{name:"do_stable_layer_norm",val:" = False"},{name:"apply_spec_augment",val:" = True"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"num_codevectors_per_group",val:" = 320"},{name:"num_codevector_groups",val:" = 2"},{name:"contrastive_logits_temperature",val:" = 0.1"},{name:"num_negatives",val:" = 100"},{name:"codevector_dim",val:" = 256"},{name:"proj_codevector_dim",val:" = 256"},{name:"diversity_loss_weight",val:" = 0.1"},{name:"ctc_loss_reduction",val:" = 'mean'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"tdnn_dim",val:" = (512, 512, 512, 512, 1500)"},{name:"tdnn_kernel",val:" = (5, 3, 3, 1, 1)"},{name:"tdnn_dilation",val:" = (1, 2, 3, 1, 1)"},{name:"xvector_output_dim",val:" = 512"},{name:"num_ctc_classes",val:" = 80"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"add_adapter",val:" = False"},{name:"adapter_kernel_size",val:" = 3"},{name:"adapter_stride",val:" = 2"},{name:"num_adapter_layers",val:" = 3"},{name:"output_hidden_size",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WavLMConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the WavLM model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMModel">WavLMModel</a>. Vocabulary size of the model. Defines the different tokens
that can be represented by the <em>inputs_ids</em> passed to the forward method of <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMModel">WavLMModel</a>.`,name:"vocab_size"},{anchor:"transformers.WavLMConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.WavLMConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.WavLMConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.WavLMConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.WavLMConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.WavLMConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.WavLMConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.WavLMConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForCTC">WavLMForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.WavLMConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.WavLMConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.WavLMConfig.feat_extract_norm",description:`<strong>feat_extract_norm</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;group&quot;</code>) &#x2014;
The norm to be applied to 1D convolutional layers in feature encoder. One of <code>&quot;group&quot;</code> for group
normalization of only the first 1D convolutional layer or <code>&quot;layer&quot;</code> for layer normalization of all 1D
convolutional layers.`,name:"feat_extract_norm"},{anchor:"transformers.WavLMConfig.feat_proj_dropout",description:`<strong>feat_proj_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for output of the feature encoder.`,name:"feat_proj_dropout"},{anchor:"transformers.WavLMConfig.feat_extract_activation",description:"<strong>feat_extract_activation</strong> (<code>str, </code>optional<code>, defaults to </code>&#x201C;gelu&#x201D;<code>) -- The non-linear activation function (function or string) in the 1D convolutional layers of the feature extractor. If string, </code>&#x201C;gelu&#x201D;<code>, </code>&#x201C;relu&#x201D;<code>, </code>&#x201C;selu&#x201D;<code>and</code>&#x201C;gelu_new&#x201D;` are supported.",name:"feat_extract_activation"},{anchor:"transformers.WavLMConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 512, 512, 512)</code>) &#x2014;
A tuple of integers defining the number of input and output channels of each 1D convolutional layer in the
feature encoder. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.WavLMConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 2, 2, 2, 2, 2)</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the feature encoder. The length
of <em>conv_stride</em> defines the number of convolutional layers and has to match the length of <em>conv_dim</em>.`,name:"conv_stride"},{anchor:"transformers.WavLMConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 3, 3, 3, 3, 3)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the feature encoder. The
length of <em>conv_kernel</em> defines the number of convolutional layers and has to match the length of
<em>conv_dim</em>.`,name:"conv_kernel"},{anchor:"transformers.WavLMConfig.conv_bias",description:`<strong>conv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the 1D convolutional layers have a bias.`,name:"conv_bias"},{anchor:"transformers.WavLMConfig.num_conv_pos_embeddings",description:`<strong>num_conv_pos_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of convolutional positional embeddings. Defines the kernel size of 1D convolutional positional
embeddings layer.`,name:"num_conv_pos_embeddings"},{anchor:"transformers.WavLMConfig.num_conv_pos_embedding_groups",description:`<strong>num_conv_pos_embedding_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of groups of 1D convolutional positional embeddings layer.`,name:"num_conv_pos_embedding_groups"},{anchor:"transformers.WavLMConfig.do_stable_layer_norm",description:`<strong>do_stable_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply <em>stable</em> layer norm architecture of the Transformer encoder. <code>do_stable_layer_norm is True</code> corresponds to applying layer norm before the attention layer, whereas <code>do_stable_layer_norm is False</code> corresponds to applying layer norm after the attention layer.`,name:"do_stable_layer_norm"},{anchor:"transformers.WavLMConfig.apply_spec_augment",description:`<strong>apply_spec_augment</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply <em>SpecAugment</em> data augmentation to the outputs of the feature encoder. For reference see
<a href="https://arxiv.org/abs/1904.08779" rel="nofollow">SpecAugment: A Simple Data Augmentation Method for Automatic Speech
Recognition</a>.`,name:"apply_spec_augment"},{anchor:"transformers.WavLMConfig.mask_time_prob",description:`<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
Propability of each feature vector along the time axis to be chosen as the start of the vector span to be
masked. Approximately <code>mask_time_prob * sequence_length // mask_time_length</code> feature vectors will be masked
along the time axis. This is only relevant if <code>apply_spec_augment is True</code>.`,name:"mask_time_prob"},{anchor:"transformers.WavLMConfig.mask_time_length",description:`<strong>mask_time_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the time axis.`,name:"mask_time_length"},{anchor:"transformers.WavLMConfig.mask_time_min_masks",description:`<strong>mask_time_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 2), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the time axis, each time step,
irrespectively of <code>mask_feature_prob</code>. Only relevant if &#x201D;mask_time_prob*len(time_axis)/mask_time_length &lt;
mask_time_min_masks&#x201D;`,name:"mask_time_min_masks"},{anchor:"transformers.WavLMConfig.mask_feature_prob",description:`<strong>mask_feature_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Propability of each feature vector along the feature axis to be chosen as the start of the vector span to
be masked. Approximately <code>mask_time_prob * hidden_size // mask_time_length</code> feature vectors will be masked
along the time axis. This is only relevant if <code>apply_spec_augment is True</code>.`,name:"mask_feature_prob"},{anchor:"transformers.WavLMConfig.mask_feature_length",description:`<strong>mask_feature_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the feature axis.`,name:"mask_feature_length"},{anchor:"transformers.WavLMConfig.num_codevectors_per_group",description:`<strong>num_codevectors_per_group</strong> (<code>int</code>, <em>optional</em>, defaults to 320) &#x2014;
Number of entries in each quantization codebook (group).`,name:"num_codevectors_per_group"},{anchor:"transformers.WavLMConfig.num_codevector_groups",description:`<strong>num_codevector_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of codevector groups for product codevector quantization.`,name:"num_codevector_groups"},{anchor:"transformers.WavLMConfig.contrastive_logits_temperature",description:`<strong>contrastive_logits_temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The temperature <em>kappa</em> in the contrastive loss.`,name:"contrastive_logits_temperature"},{anchor:"transformers.WavLMConfig.num_negatives",description:`<strong>num_negatives</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of negative samples for the contrastive loss.`,name:"num_negatives"},{anchor:"transformers.WavLMConfig.codevector_dim",description:`<strong>codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the quantized feature vectors.`,name:"codevector_dim"},{anchor:"transformers.WavLMConfig.proj_codevector_dim",description:`<strong>proj_codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the final projection of both the quantized and the transformer features.`,name:"proj_codevector_dim"},{anchor:"transformers.WavLMConfig.diversity_loss_weight",description:`<strong>diversity_loss_weight</strong> (<code>int</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The weight of the codebook diversity loss component.`,name:"diversity_loss_weight"},{anchor:"transformers.WavLMConfig.ctc_loss_reduction",description:`<strong>ctc_loss_reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Specifies the reduction to apply to the output of <code>torch.nn.CTCLoss</code>. Only relevant when training an
instance of <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForCTC">WavLMForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.WavLMConfig.ctc_zero_infinity",description:`<strong>ctc_zero_infinity</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to zero infinite losses and the associated gradients of <code>torch.nn.CTCLoss</code>. Infinite losses mainly
occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
of <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForCTC">WavLMForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.WavLMConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForSequenceClassification">WavLMForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.WavLMConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.WavLMConfig.tdnn_dim",description:`<strong>tdnn_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 1500)</code>) &#x2014;
A tuple of integers defining the number of output channels of each 1D convolutional layer in the <em>TDNN</em>
module of the <em>XVector</em> model. The length of <em>tdnn_dim</em> defines the number of <em>TDNN</em> layers.`,name:"tdnn_dim"},{anchor:"transformers.WavLMConfig.tdnn_kernel",description:`<strong>tdnn_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 3, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_kernel</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_kernel"},{anchor:"transformers.WavLMConfig.tdnn_dilation",description:`<strong>tdnn_dilation</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(1, 2, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the dilation factor of each 1D convolutional layer in <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_dilation</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_dilation"},{anchor:"transformers.WavLMConfig.xvector_output_dim",description:`<strong>xvector_output_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"xvector_output_dim"},{anchor:"transformers.WavLMConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional network should be stacked on top of the Wav2Vec2 Encoder. Can be very useful for
warm-starting Wav2Vec2 for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.WavLMConfig.adapter_kernel_size",description:`<strong>adapter_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_kernel_size"},{anchor:"transformers.WavLMConfig.adapter_stride",description:`<strong>adapter_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_stride"},{anchor:"transformers.WavLMConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of convolutional layers that should be used in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"num_adapter_layers"},{anchor:"transformers.WavLMConfig.output_hidden_size",description:`<strong>output_hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the encoder output layer. If not defined, this defaults to <em>hidden-size</em>. Only relevant
if <code>add_adapter is True</code>.`,name:"output_hidden_size"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/configuration_wavlm.py#L32"}}),_e=new Dt({props:{anchor:"transformers.WavLMConfig.example",$$slots:{default:[kl]},$$scope:{ctx:W}}}),ve=new Dt({props:{anchor:"transformers.WavLMConfig.example-2",$$slots:{default:[$l]},$$scope:{ctx:W}}}),Ze=new ce({}),Qe=new X({props:{name:"class transformers.WavLMModel",anchor:"transformers.WavLMModel",parameters:[{name:"config",val:": WavLMConfig"}],parametersDescription:[{anchor:"transformers.WavLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig">WavLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1118"}}),at=new X({props:{name:"forward",anchor:"transformers.WavLMModel.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mask_time_indices",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WavLMModel.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.WavLMModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.WavLMModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WavLMModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WavLMModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1204",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig"
>WavLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>extract_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, conv_dim[-1])</code>) \u2014 Sequence of extracted feature vectors of the last convolutional layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new oa({props:{$$slots:{default:[Ll]},$$scope:{ctx:W}}}),ye=new Dt({props:{anchor:"transformers.WavLMModel.forward.example",$$slots:{default:[Wl]},$$scope:{ctx:W}}}),nt=new ce({}),st=new X({props:{name:"class transformers.WavLMForCTC",anchor:"transformers.WavLMForCTC",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WavLMForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig">WavLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1270"}}),ct=new X({props:{name:"forward",anchor:"transformers.WavLMForCTC.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.WavLMForCTC.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.WavLMForCTC.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.WavLMForCTC.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WavLMForCTC.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WavLMForCTC.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WavLMForCTC.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_length)</code>, <em>optional</em>) &#x2014;
Labels for connectionist temporal classification. Note that <code>target_length</code> has to be smaller or equal to
the sequence length of the output logits. Indices are selected in <code>[-100, 0, ..., config.vocab_size - 1]</code>.
All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1311",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig"
>WavLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new oa({props:{$$slots:{default:[Tl]},$$scope:{ctx:W}}}),$e=new Dt({props:{anchor:"transformers.WavLMForCTC.forward.example",$$slots:{default:[Cl]},$$scope:{ctx:W}}}),pt=new ce({}),mt=new X({props:{name:"class transformers.WavLMForSequenceClassification",anchor:"transformers.WavLMForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WavLMForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig">WavLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1398"}}),vt=new X({props:{name:"forward",anchor:"transformers.WavLMForSequenceClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.WavLMForSequenceClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.WavLMForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.WavLMForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WavLMForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WavLMForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WavLMForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1446",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig"
>WavLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),We=new oa({props:{$$slots:{default:[jl]},$$scope:{ctx:W}}}),Te=new Dt({props:{anchor:"transformers.WavLMForSequenceClassification.forward.example",$$slots:{default:[Fl]},$$scope:{ctx:W}}}),bt=new ce({}),wt=new X({props:{name:"class transformers.WavLMForAudioFrameClassification",anchor:"transformers.WavLMForAudioFrameClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WavLMForAudioFrameClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig">WavLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1523"}}),Wt=new X({props:{name:"forward",anchor:"transformers.WavLMForAudioFrameClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WavLMForAudioFrameClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.WavLMForAudioFrameClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.WavLMForAudioFrameClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WavLMForAudioFrameClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WavLMForAudioFrameClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WavLMForAudioFrameClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1567",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig"
>WavLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new oa({props:{$$slots:{default:[xl]},$$scope:{ctx:W}}}),Fe=new Dt({props:{anchor:"transformers.WavLMForAudioFrameClassification.forward.example",$$slots:{default:[ql]},$$scope:{ctx:W}}}),Tt=new ce({}),Ct=new X({props:{name:"class transformers.WavLMForXVector",anchor:"transformers.WavLMForXVector",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WavLMForXVector.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig">WavLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1687"}}),Pt=new X({props:{name:"forward",anchor:"transformers.WavLMForXVector.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.WavLMForXVector.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.WavLMForXVector.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.WavLMForXVector.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WavLMForXVector.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WavLMForXVector.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WavLMForXVector.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/wavlm/modeling_wavlm.py#L1749",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMConfig"
>WavLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qe=new oa({props:{$$slots:{default:[El]},$$scope:{ctx:W}}}),Ee=new Dt({props:{anchor:"transformers.WavLMForXVector.forward.example",$$slots:{default:[Pl]},$$scope:{ctx:W}}}),{c(){d=n("meta"),b=h(),f=n("h1"),m=n("a"),v=n("span"),w(a.$$.fragment),p=h(),T=n("span"),Qa=i("WavLM"),aa=h(),R=n("h2"),pe=n("a"),vo=n("span"),w(Oe.$$.fragment),Ja=h(),bo=n("span"),Ga=i("Overview"),na=h(),me=n("p"),en=i("The WavLM model was proposed in "),Ve=n("a"),tn=i("WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing"),on=i(` by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen,
Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu,
Michael Zeng, Furu Wei.`),sa=h(),Nt=n("p"),an=i("The abstract from the paper is the following:"),ra=h(),Xt=n("p"),wo=n("em"),nn=i(`Self-supervised learning (SSL) achieves great success in speech recognition, while limited exploration has been
attempted for other speech processing tasks. As speech signal contains multi-faceted information including speaker
identity, paralinguistics, spoken content, etc., learning universal representations for all speech tasks is
challenging. In this paper, we propose a new pre-trained model, WavLM, to solve full-stack downstream speech tasks.
WavLM is built based on the HuBERT framework, with an emphasis on both spoken content modeling and speaker identity
preservation. We first equip the Transformer structure with gated relative position bias to improve its capability on
recognition tasks. For better speaker discrimination, we propose an utterance mixing training strategy, where
additional overlapped utterances are created unsupervisely and incorporated during model training. Lastly, we scale up
the training dataset from 60k hours to 94k hours. WavLM Large achieves state-of-the-art performance on the SUPERB
benchmark, and brings significant improvements for various speech processing tasks on their representative benchmarks.`),ia=h(),It=n("p"),sn=i("Tips:"),la=h(),I=n("ul"),Ne=n("li"),rn=i(`WavLM is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please use
`),Ut=n("a"),ln=i("Wav2Vec2Processor"),dn=i(" for the feature extraction."),cn=h(),Xe=n("li"),pn=i(`WavLM model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded
using `),Yt=n("a"),mn=i("Wav2Vec2CTCTokenizer"),hn=i("."),un=h(),yo=n("li"),fn=i("WavLM performs especially well on speaker verification, speaker identification, and speaker diarization tasks."),da=h(),he=n("p"),gn=i("Relevant checkpoints can be found under "),Ie=n("a"),_n=i("https://huggingface.co/models?other=wavlm"),vn=i("."),ca=h(),U=n("p"),bn=i("This model was contributed by "),Ue=n("a"),wn=i("patrickvonplaten"),yn=i(`. The Authors\u2019 code can be
found `),Ye=n("a"),Mn=i("here"),kn=i("."),pa=h(),B=n("h2"),ue=n("a"),Mo=n("span"),w(He.$$.fragment),$n=h(),ko=n("span"),Ln=i("Documentation resources"),ma=h(),fe=n("ul"),$o=n("li"),Ht=n("a"),Wn=i("Audio classification task guide"),Tn=h(),Lo=n("li"),Kt=n("a"),Cn=i("Automatic speech recognition task guide"),ha=h(),Z=n("h2"),ge=n("a"),Wo=n("span"),w(Ke.$$.fragment),jn=h(),To=n("span"),Fn=i("WavLMConfig"),ua=h(),x=n("div"),w(Re.$$.fragment),xn=h(),Q=n("p"),qn=i("This is the configuration class to store the configuration of a "),Rt=n("a"),En=i("WavLMModel"),Pn=i(`. It is used to instantiate an WavLM
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the WavLM
`),Be=n("a"),An=i("microsoft/wavlm-base"),Sn=i(" architecture."),zn=h(),J=n("p"),Dn=i("Configuration objects inherit from "),Bt=n("a"),On=i("PretrainedConfig"),Vn=i(` and can be used to control the model outputs. Read the
documentation from `),Zt=n("a"),Nn=i("PretrainedConfig"),Xn=i(" for more information."),In=h(),w(_e.$$.fragment),Un=h(),w(ve.$$.fragment),fa=h(),G=n("h2"),be=n("a"),Co=n("span"),w(Ze.$$.fragment),Yn=h(),jo=n("span"),Hn=i("WavLMModel"),ga=h(),q=n("div"),w(Qe.$$.fragment),Kn=h(),Je=n("p"),Rn=i(`The bare WavLM Model transformer outputting raw hidden-states without any specific head on top.
WavLM was proposed in `),Ge=n("a"),Bn=i(`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Zn=i(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Qn=h(),et=n("p"),Jn=i("This model inherits from "),Qt=n("a"),Gn=i("PreTrainedModel"),es=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ts=h(),tt=n("p"),os=i("This model is a PyTorch "),ot=n("a"),as=i("torch.nn.Module"),ns=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ss=h(),P=n("div"),w(at.$$.fragment),rs=h(),ee=n("p"),is=i("The "),Jt=n("a"),ls=i("WavLMModel"),ds=i(" forward method, overrides the "),Fo=n("code"),cs=i("__call__"),ps=i(" special method."),ms=h(),w(we.$$.fragment),hs=h(),w(ye.$$.fragment),_a=h(),te=n("h2"),Me=n("a"),xo=n("span"),w(nt.$$.fragment),us=h(),qo=n("span"),fs=i("WavLMForCTC"),va=h(),E=n("div"),w(st.$$.fragment),gs=h(),oe=n("p"),_s=i("WavLM Model with a "),Eo=n("code"),vs=i("language modeling"),bs=i(` head on top for Connectionist Temporal Classification (CTC).
WavLM was proposed in `),rt=n("a"),ws=i(`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),ys=i(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ms=h(),it=n("p"),ks=i("This model inherits from "),Gt=n("a"),$s=i("PreTrainedModel"),Ls=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ws=h(),lt=n("p"),Ts=i("This model is a PyTorch "),dt=n("a"),Cs=i("torch.nn.Module"),js=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fs=h(),A=n("div"),w(ct.$$.fragment),xs=h(),ae=n("p"),qs=i("The "),eo=n("a"),Es=i("WavLMForCTC"),Ps=i(" forward method, overrides the "),Po=n("code"),As=i("__call__"),Ss=i(" special method."),zs=h(),w(ke.$$.fragment),Ds=h(),w($e.$$.fragment),ba=h(),ne=n("h2"),Le=n("a"),Ao=n("span"),w(pt.$$.fragment),Os=h(),So=n("span"),Vs=i("WavLMForSequenceClassification"),wa=h(),C=n("div"),w(mt.$$.fragment),Ns=h(),zo=n("p"),Xs=i(`WavLM Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),Is=h(),ht=n("p"),Us=i("WavLM was proposed in "),ut=n("a"),Ys=i(`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Hs=i(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ks=h(),ft=n("p"),Rs=i("This model inherits from "),to=n("a"),Bs=i("PreTrainedModel"),Zs=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Qs=h(),gt=n("p"),Js=i("This model is a PyTorch "),_t=n("a"),Gs=i("torch.nn.Module"),er=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tr=h(),S=n("div"),w(vt.$$.fragment),or=h(),se=n("p"),ar=i("The "),oo=n("a"),nr=i("WavLMForSequenceClassification"),sr=i(" forward method, overrides the "),Do=n("code"),rr=i("__call__"),ir=i(" special method."),lr=h(),w(We.$$.fragment),dr=h(),w(Te.$$.fragment),ya=h(),re=n("h2"),Ce=n("a"),Oo=n("span"),w(bt.$$.fragment),cr=h(),Vo=n("span"),pr=i("WavLMForAudioFrameClassification"),Ma=h(),j=n("div"),w(wt.$$.fragment),mr=h(),No=n("p"),hr=i("WavLM Model with a frame classification head on top for tasks like Speaker Diarization."),ur=h(),yt=n("p"),fr=i("WavLM was proposed in "),Mt=n("a"),gr=i(`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),_r=i(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),vr=h(),kt=n("p"),br=i("This model inherits from "),ao=n("a"),wr=i("PreTrainedModel"),yr=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Mr=h(),$t=n("p"),kr=i("This model is a PyTorch "),Lt=n("a"),$r=i("torch.nn.Module"),Lr=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wr=h(),z=n("div"),w(Wt.$$.fragment),Tr=h(),ie=n("p"),Cr=i("The "),no=n("a"),jr=i("WavLMForAudioFrameClassification"),Fr=i(" forward method, overrides the "),Xo=n("code"),xr=i("__call__"),qr=i(" special method."),Er=h(),w(je.$$.fragment),Pr=h(),w(Fe.$$.fragment),ka=h(),le=n("h2"),xe=n("a"),Io=n("span"),w(Tt.$$.fragment),Ar=h(),Uo=n("span"),Sr=i("WavLMForXVector"),$a=h(),F=n("div"),w(Ct.$$.fragment),zr=h(),Yo=n("p"),Dr=i("WavLM Model with an XVector feature extraction head on top for tasks like Speaker Verification."),Or=h(),jt=n("p"),Vr=i("WavLM was proposed in "),Ft=n("a"),Nr=i(`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Xr=i(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ir=h(),xt=n("p"),Ur=i("This model inherits from "),so=n("a"),Yr=i("PreTrainedModel"),Hr=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Kr=h(),qt=n("p"),Rr=i("This model is a PyTorch "),Et=n("a"),Br=i("torch.nn.Module"),Zr=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qr=h(),D=n("div"),w(Pt.$$.fragment),Jr=h(),de=n("p"),Gr=i("The "),ro=n("a"),ei=i("WavLMForXVector"),ti=i(" forward method, overrides the "),Ho=n("code"),oi=i("__call__"),ai=i(" special method."),ni=h(),w(qe.$$.fragment),si=h(),w(Ee.$$.fragment),this.h()},l(t){const g=yl('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(o),b=u(t),f=s(t,"H1",{class:!0});var At=r(f);m=s(At,"A",{id:!0,class:!0,href:!0});var Ko=r(m);v=s(Ko,"SPAN",{});var Ro=r(v);y(a.$$.fragment,Ro),Ro.forEach(o),Ko.forEach(o),p=u(At),T=s(At,"SPAN",{});var Bo=r(T);Qa=l(Bo,"WavLM"),Bo.forEach(o),At.forEach(o),aa=u(t),R=s(t,"H2",{class:!0});var St=r(R);pe=s(St,"A",{id:!0,class:!0,href:!0});var Zo=r(pe);vo=s(Zo,"SPAN",{});var Qo=r(vo);y(Oe.$$.fragment,Qo),Qo.forEach(o),Zo.forEach(o),Ja=u(St),bo=s(St,"SPAN",{});var Jo=r(bo);Ga=l(Jo,"Overview"),Jo.forEach(o),St.forEach(o),na=u(t),me=s(t,"P",{});var zt=r(me);en=l(zt,"The WavLM model was proposed in "),Ve=s(zt,"A",{href:!0,rel:!0});var Go=r(Ve);tn=l(Go,"WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing"),Go.forEach(o),on=l(zt,` by Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen,
Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu,
Michael Zeng, Furu Wei.`),zt.forEach(o),sa=u(t),Nt=s(t,"P",{});var ea=r(Nt);an=l(ea,"The abstract from the paper is the following:"),ea.forEach(o),ra=u(t),Xt=s(t,"P",{});var ta=r(Xt);wo=s(ta,"EM",{});var ri=r(wo);nn=l(ri,`Self-supervised learning (SSL) achieves great success in speech recognition, while limited exploration has been
attempted for other speech processing tasks. As speech signal contains multi-faceted information including speaker
identity, paralinguistics, spoken content, etc., learning universal representations for all speech tasks is
challenging. In this paper, we propose a new pre-trained model, WavLM, to solve full-stack downstream speech tasks.
WavLM is built based on the HuBERT framework, with an emphasis on both spoken content modeling and speaker identity
preservation. We first equip the Transformer structure with gated relative position bias to improve its capability on
recognition tasks. For better speaker discrimination, we propose an utterance mixing training strategy, where
additional overlapped utterances are created unsupervisely and incorporated during model training. Lastly, we scale up
the training dataset from 60k hours to 94k hours. WavLM Large achieves state-of-the-art performance on the SUPERB
benchmark, and brings significant improvements for various speech processing tasks on their representative benchmarks.`),ri.forEach(o),ta.forEach(o),ia=u(t),It=s(t,"P",{});var ii=r(It);sn=l(ii,"Tips:"),ii.forEach(o),la=u(t),I=s(t,"UL",{});var io=r(I);Ne=s(io,"LI",{});var Wa=r(Ne);rn=l(Wa,`WavLM is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please use
`),Ut=s(Wa,"A",{href:!0});var li=r(Ut);ln=l(li,"Wav2Vec2Processor"),li.forEach(o),dn=l(Wa," for the feature extraction."),Wa.forEach(o),cn=u(io),Xe=s(io,"LI",{});var Ta=r(Xe);pn=l(Ta,`WavLM model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be decoded
using `),Yt=s(Ta,"A",{href:!0});var di=r(Yt);mn=l(di,"Wav2Vec2CTCTokenizer"),di.forEach(o),hn=l(Ta,"."),Ta.forEach(o),un=u(io),yo=s(io,"LI",{});var ci=r(yo);fn=l(ci,"WavLM performs especially well on speaker verification, speaker identification, and speaker diarization tasks."),ci.forEach(o),io.forEach(o),da=u(t),he=s(t,"P",{});var Ca=r(he);gn=l(Ca,"Relevant checkpoints can be found under "),Ie=s(Ca,"A",{href:!0,rel:!0});var pi=r(Ie);_n=l(pi,"https://huggingface.co/models?other=wavlm"),pi.forEach(o),vn=l(Ca,"."),Ca.forEach(o),ca=u(t),U=s(t,"P",{});var lo=r(U);bn=l(lo,"This model was contributed by "),Ue=s(lo,"A",{href:!0,rel:!0});var mi=r(Ue);wn=l(mi,"patrickvonplaten"),mi.forEach(o),yn=l(lo,`. The Authors\u2019 code can be
found `),Ye=s(lo,"A",{href:!0,rel:!0});var hi=r(Ye);Mn=l(hi,"here"),hi.forEach(o),kn=l(lo,"."),lo.forEach(o),pa=u(t),B=s(t,"H2",{class:!0});var ja=r(B);ue=s(ja,"A",{id:!0,class:!0,href:!0});var ui=r(ue);Mo=s(ui,"SPAN",{});var fi=r(Mo);y(He.$$.fragment,fi),fi.forEach(o),ui.forEach(o),$n=u(ja),ko=s(ja,"SPAN",{});var gi=r(ko);Ln=l(gi,"Documentation resources"),gi.forEach(o),ja.forEach(o),ma=u(t),fe=s(t,"UL",{});var Fa=r(fe);$o=s(Fa,"LI",{});var _i=r($o);Ht=s(_i,"A",{href:!0});var vi=r(Ht);Wn=l(vi,"Audio classification task guide"),vi.forEach(o),_i.forEach(o),Tn=u(Fa),Lo=s(Fa,"LI",{});var bi=r(Lo);Kt=s(bi,"A",{href:!0});var wi=r(Kt);Cn=l(wi,"Automatic speech recognition task guide"),wi.forEach(o),bi.forEach(o),Fa.forEach(o),ha=u(t),Z=s(t,"H2",{class:!0});var xa=r(Z);ge=s(xa,"A",{id:!0,class:!0,href:!0});var yi=r(ge);Wo=s(yi,"SPAN",{});var Mi=r(Wo);y(Ke.$$.fragment,Mi),Mi.forEach(o),yi.forEach(o),jn=u(xa),To=s(xa,"SPAN",{});var ki=r(To);Fn=l(ki,"WavLMConfig"),ki.forEach(o),xa.forEach(o),ua=u(t),x=s(t,"DIV",{class:!0});var Y=r(x);y(Re.$$.fragment,Y),xn=u(Y),Q=s(Y,"P",{});var co=r(Q);qn=l(co,"This is the configuration class to store the configuration of a "),Rt=s(co,"A",{href:!0});var $i=r(Rt);En=l($i,"WavLMModel"),$i.forEach(o),Pn=l(co,`. It is used to instantiate an WavLM
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the WavLM
`),Be=s(co,"A",{href:!0,rel:!0});var Li=r(Be);An=l(Li,"microsoft/wavlm-base"),Li.forEach(o),Sn=l(co," architecture."),co.forEach(o),zn=u(Y),J=s(Y,"P",{});var po=r(J);Dn=l(po,"Configuration objects inherit from "),Bt=s(po,"A",{href:!0});var Wi=r(Bt);On=l(Wi,"PretrainedConfig"),Wi.forEach(o),Vn=l(po,` and can be used to control the model outputs. Read the
documentation from `),Zt=s(po,"A",{href:!0});var Ti=r(Zt);Nn=l(Ti,"PretrainedConfig"),Ti.forEach(o),Xn=l(po," for more information."),po.forEach(o),In=u(Y),y(_e.$$.fragment,Y),Un=u(Y),y(ve.$$.fragment,Y),Y.forEach(o),fa=u(t),G=s(t,"H2",{class:!0});var qa=r(G);be=s(qa,"A",{id:!0,class:!0,href:!0});var Ci=r(be);Co=s(Ci,"SPAN",{});var ji=r(Co);y(Ze.$$.fragment,ji),ji.forEach(o),Ci.forEach(o),Yn=u(qa),jo=s(qa,"SPAN",{});var Fi=r(jo);Hn=l(Fi,"WavLMModel"),Fi.forEach(o),qa.forEach(o),ga=u(t),q=s(t,"DIV",{class:!0});var H=r(q);y(Qe.$$.fragment,H),Kn=u(H),Je=s(H,"P",{});var Ea=r(Je);Rn=l(Ea,`The bare WavLM Model transformer outputting raw hidden-states without any specific head on top.
WavLM was proposed in `),Ge=s(Ea,"A",{href:!0,rel:!0});var xi=r(Ge);Bn=l(xi,`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),xi.forEach(o),Zn=l(Ea,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ea.forEach(o),Qn=u(H),et=s(H,"P",{});var Pa=r(et);Jn=l(Pa,"This model inherits from "),Qt=s(Pa,"A",{href:!0});var qi=r(Qt);Gn=l(qi,"PreTrainedModel"),qi.forEach(o),es=l(Pa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Pa.forEach(o),ts=u(H),tt=s(H,"P",{});var Aa=r(tt);os=l(Aa,"This model is a PyTorch "),ot=s(Aa,"A",{href:!0,rel:!0});var Ei=r(ot);as=l(Ei,"torch.nn.Module"),Ei.forEach(o),ns=l(Aa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Aa.forEach(o),ss=u(H),P=s(H,"DIV",{class:!0});var Pe=r(P);y(at.$$.fragment,Pe),rs=u(Pe),ee=s(Pe,"P",{});var mo=r(ee);is=l(mo,"The "),Jt=s(mo,"A",{href:!0});var Pi=r(Jt);ls=l(Pi,"WavLMModel"),Pi.forEach(o),ds=l(mo," forward method, overrides the "),Fo=s(mo,"CODE",{});var Ai=r(Fo);cs=l(Ai,"__call__"),Ai.forEach(o),ps=l(mo," special method."),mo.forEach(o),ms=u(Pe),y(we.$$.fragment,Pe),hs=u(Pe),y(ye.$$.fragment,Pe),Pe.forEach(o),H.forEach(o),_a=u(t),te=s(t,"H2",{class:!0});var Sa=r(te);Me=s(Sa,"A",{id:!0,class:!0,href:!0});var Si=r(Me);xo=s(Si,"SPAN",{});var zi=r(xo);y(nt.$$.fragment,zi),zi.forEach(o),Si.forEach(o),us=u(Sa),qo=s(Sa,"SPAN",{});var Di=r(qo);fs=l(Di,"WavLMForCTC"),Di.forEach(o),Sa.forEach(o),va=u(t),E=s(t,"DIV",{class:!0});var K=r(E);y(st.$$.fragment,K),gs=u(K),oe=s(K,"P",{});var ho=r(oe);_s=l(ho,"WavLM Model with a "),Eo=s(ho,"CODE",{});var Oi=r(Eo);vs=l(Oi,"language modeling"),Oi.forEach(o),bs=l(ho,` head on top for Connectionist Temporal Classification (CTC).
WavLM was proposed in `),rt=s(ho,"A",{href:!0,rel:!0});var Vi=r(rt);ws=l(Vi,`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Vi.forEach(o),ys=l(ho,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),ho.forEach(o),Ms=u(K),it=s(K,"P",{});var za=r(it);ks=l(za,"This model inherits from "),Gt=s(za,"A",{href:!0});var Ni=r(Gt);$s=l(Ni,"PreTrainedModel"),Ni.forEach(o),Ls=l(za,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),za.forEach(o),Ws=u(K),lt=s(K,"P",{});var Da=r(lt);Ts=l(Da,"This model is a PyTorch "),dt=s(Da,"A",{href:!0,rel:!0});var Xi=r(dt);Cs=l(Xi,"torch.nn.Module"),Xi.forEach(o),js=l(Da,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Da.forEach(o),Fs=u(K),A=s(K,"DIV",{class:!0});var Ae=r(A);y(ct.$$.fragment,Ae),xs=u(Ae),ae=s(Ae,"P",{});var uo=r(ae);qs=l(uo,"The "),eo=s(uo,"A",{href:!0});var Ii=r(eo);Es=l(Ii,"WavLMForCTC"),Ii.forEach(o),Ps=l(uo," forward method, overrides the "),Po=s(uo,"CODE",{});var Ui=r(Po);As=l(Ui,"__call__"),Ui.forEach(o),Ss=l(uo," special method."),uo.forEach(o),zs=u(Ae),y(ke.$$.fragment,Ae),Ds=u(Ae),y($e.$$.fragment,Ae),Ae.forEach(o),K.forEach(o),ba=u(t),ne=s(t,"H2",{class:!0});var Oa=r(ne);Le=s(Oa,"A",{id:!0,class:!0,href:!0});var Yi=r(Le);Ao=s(Yi,"SPAN",{});var Hi=r(Ao);y(pt.$$.fragment,Hi),Hi.forEach(o),Yi.forEach(o),Os=u(Oa),So=s(Oa,"SPAN",{});var Ki=r(So);Vs=l(Ki,"WavLMForSequenceClassification"),Ki.forEach(o),Oa.forEach(o),wa=u(t),C=s(t,"DIV",{class:!0});var O=r(C);y(mt.$$.fragment,O),Ns=u(O),zo=s(O,"P",{});var Ri=r(zo);Xs=l(Ri,`WavLM Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),Ri.forEach(o),Is=u(O),ht=s(O,"P",{});var Va=r(ht);Us=l(Va,"WavLM was proposed in "),ut=s(Va,"A",{href:!0,rel:!0});var Bi=r(ut);Ys=l(Bi,`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Bi.forEach(o),Hs=l(Va,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Va.forEach(o),Ks=u(O),ft=s(O,"P",{});var Na=r(ft);Rs=l(Na,"This model inherits from "),to=s(Na,"A",{href:!0});var Zi=r(to);Bs=l(Zi,"PreTrainedModel"),Zi.forEach(o),Zs=l(Na,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Na.forEach(o),Qs=u(O),gt=s(O,"P",{});var Xa=r(gt);Js=l(Xa,"This model is a PyTorch "),_t=s(Xa,"A",{href:!0,rel:!0});var Qi=r(_t);Gs=l(Qi,"torch.nn.Module"),Qi.forEach(o),er=l(Xa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xa.forEach(o),tr=u(O),S=s(O,"DIV",{class:!0});var Se=r(S);y(vt.$$.fragment,Se),or=u(Se),se=s(Se,"P",{});var fo=r(se);ar=l(fo,"The "),oo=s(fo,"A",{href:!0});var Ji=r(oo);nr=l(Ji,"WavLMForSequenceClassification"),Ji.forEach(o),sr=l(fo," forward method, overrides the "),Do=s(fo,"CODE",{});var Gi=r(Do);rr=l(Gi,"__call__"),Gi.forEach(o),ir=l(fo," special method."),fo.forEach(o),lr=u(Se),y(We.$$.fragment,Se),dr=u(Se),y(Te.$$.fragment,Se),Se.forEach(o),O.forEach(o),ya=u(t),re=s(t,"H2",{class:!0});var Ia=r(re);Ce=s(Ia,"A",{id:!0,class:!0,href:!0});var el=r(Ce);Oo=s(el,"SPAN",{});var tl=r(Oo);y(bt.$$.fragment,tl),tl.forEach(o),el.forEach(o),cr=u(Ia),Vo=s(Ia,"SPAN",{});var ol=r(Vo);pr=l(ol,"WavLMForAudioFrameClassification"),ol.forEach(o),Ia.forEach(o),Ma=u(t),j=s(t,"DIV",{class:!0});var V=r(j);y(wt.$$.fragment,V),mr=u(V),No=s(V,"P",{});var al=r(No);hr=l(al,"WavLM Model with a frame classification head on top for tasks like Speaker Diarization."),al.forEach(o),ur=u(V),yt=s(V,"P",{});var Ua=r(yt);fr=l(Ua,"WavLM was proposed in "),Mt=s(Ua,"A",{href:!0,rel:!0});var nl=r(Mt);gr=l(nl,`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),nl.forEach(o),_r=l(Ua,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ua.forEach(o),vr=u(V),kt=s(V,"P",{});var Ya=r(kt);br=l(Ya,"This model inherits from "),ao=s(Ya,"A",{href:!0});var sl=r(ao);wr=l(sl,"PreTrainedModel"),sl.forEach(o),yr=l(Ya,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ya.forEach(o),Mr=u(V),$t=s(V,"P",{});var Ha=r($t);kr=l(Ha,"This model is a PyTorch "),Lt=s(Ha,"A",{href:!0,rel:!0});var rl=r(Lt);$r=l(rl,"torch.nn.Module"),rl.forEach(o),Lr=l(Ha,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ha.forEach(o),Wr=u(V),z=s(V,"DIV",{class:!0});var ze=r(z);y(Wt.$$.fragment,ze),Tr=u(ze),ie=s(ze,"P",{});var go=r(ie);Cr=l(go,"The "),no=s(go,"A",{href:!0});var il=r(no);jr=l(il,"WavLMForAudioFrameClassification"),il.forEach(o),Fr=l(go," forward method, overrides the "),Xo=s(go,"CODE",{});var ll=r(Xo);xr=l(ll,"__call__"),ll.forEach(o),qr=l(go," special method."),go.forEach(o),Er=u(ze),y(je.$$.fragment,ze),Pr=u(ze),y(Fe.$$.fragment,ze),ze.forEach(o),V.forEach(o),ka=u(t),le=s(t,"H2",{class:!0});var Ka=r(le);xe=s(Ka,"A",{id:!0,class:!0,href:!0});var dl=r(xe);Io=s(dl,"SPAN",{});var cl=r(Io);y(Tt.$$.fragment,cl),cl.forEach(o),dl.forEach(o),Ar=u(Ka),Uo=s(Ka,"SPAN",{});var pl=r(Uo);Sr=l(pl,"WavLMForXVector"),pl.forEach(o),Ka.forEach(o),$a=u(t),F=s(t,"DIV",{class:!0});var N=r(F);y(Ct.$$.fragment,N),zr=u(N),Yo=s(N,"P",{});var ml=r(Yo);Dr=l(ml,"WavLM Model with an XVector feature extraction head on top for tasks like Speaker Verification."),ml.forEach(o),Or=u(N),jt=s(N,"P",{});var Ra=r(jt);Vr=l(Ra,"WavLM was proposed in "),Ft=s(Ra,"A",{href:!0,rel:!0});var hl=r(Ft);Nr=l(hl,`WavLM: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),hl.forEach(o),Xr=l(Ra,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Ra.forEach(o),Ir=u(N),xt=s(N,"P",{});var Ba=r(xt);Ur=l(Ba,"This model inherits from "),so=s(Ba,"A",{href:!0});var ul=r(so);Yr=l(ul,"PreTrainedModel"),ul.forEach(o),Hr=l(Ba,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ba.forEach(o),Kr=u(N),qt=s(N,"P",{});var Za=r(qt);Rr=l(Za,"This model is a PyTorch "),Et=s(Za,"A",{href:!0,rel:!0});var fl=r(Et);Br=l(fl,"torch.nn.Module"),fl.forEach(o),Zr=l(Za,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Za.forEach(o),Qr=u(N),D=s(N,"DIV",{class:!0});var De=r(D);y(Pt.$$.fragment,De),Jr=u(De),de=s(De,"P",{});var _o=r(de);Gr=l(_o,"The "),ro=s(_o,"A",{href:!0});var gl=r(ro);ei=l(gl,"WavLMForXVector"),gl.forEach(o),ti=l(_o," forward method, overrides the "),Ho=s(_o,"CODE",{});var _l=r(Ho);oi=l(_l,"__call__"),_l.forEach(o),ai=l(_o," special method."),_o.forEach(o),ni=u(De),y(qe.$$.fragment,De),si=u(De),y(Ee.$$.fragment,De),De.forEach(o),N.forEach(o),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Sl)),c(m,"id","wavlm"),c(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(m,"href","#wavlm"),c(f,"class","relative group"),c(pe,"id","overview"),c(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(pe,"href","#overview"),c(R,"class","relative group"),c(Ve,"href","https://arxiv.org/abs/2110.13900"),c(Ve,"rel","nofollow"),c(Ut,"href","/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor"),c(Yt,"href","/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),c(Ie,"href","https://huggingface.co/models?other=wavlm"),c(Ie,"rel","nofollow"),c(Ue,"href","https://huggingface.co/patrickvonplaten"),c(Ue,"rel","nofollow"),c(Ye,"href","https://github.com/microsoft/unilm/tree/master/wavlm"),c(Ye,"rel","nofollow"),c(ue,"id","documentation-resources"),c(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ue,"href","#documentation-resources"),c(B,"class","relative group"),c(Ht,"href","../tasks/audio_classification"),c(Kt,"href","../tasks/asr"),c(ge,"id","transformers.WavLMConfig"),c(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ge,"href","#transformers.WavLMConfig"),c(Z,"class","relative group"),c(Rt,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMModel"),c(Be,"href","https://huggingface.co/microsoft/wavlm-base"),c(Be,"rel","nofollow"),c(Bt,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Zt,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(be,"id","transformers.WavLMModel"),c(be,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(be,"href","#transformers.WavLMModel"),c(G,"class","relative group"),c(Ge,"href","https://arxiv.org/abs/2101.07597"),c(Ge,"rel","nofollow"),c(Qt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(ot,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ot,"rel","nofollow"),c(Jt,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMModel"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Me,"id","transformers.WavLMForCTC"),c(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Me,"href","#transformers.WavLMForCTC"),c(te,"class","relative group"),c(rt,"href","https://arxiv.org/abs/2101.07597"),c(rt,"rel","nofollow"),c(Gt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(dt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(dt,"rel","nofollow"),c(eo,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForCTC"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Le,"id","transformers.WavLMForSequenceClassification"),c(Le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Le,"href","#transformers.WavLMForSequenceClassification"),c(ne,"class","relative group"),c(ut,"href","https://arxiv.org/abs/2101.07597"),c(ut,"rel","nofollow"),c(to,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(_t,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(_t,"rel","nofollow"),c(oo,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForSequenceClassification"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ce,"id","transformers.WavLMForAudioFrameClassification"),c(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ce,"href","#transformers.WavLMForAudioFrameClassification"),c(re,"class","relative group"),c(Mt,"href","https://arxiv.org/abs/2101.07597"),c(Mt,"rel","nofollow"),c(ao,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(Lt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Lt,"rel","nofollow"),c(no,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForAudioFrameClassification"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(xe,"id","transformers.WavLMForXVector"),c(xe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(xe,"href","#transformers.WavLMForXVector"),c(le,"class","relative group"),c(Ft,"href","https://arxiv.org/abs/2101.07597"),c(Ft,"rel","nofollow"),c(so,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(Et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Et,"rel","nofollow"),c(ro,"href","/docs/transformers/v4.29.0/en/model_doc/wavlm#transformers.WavLMForXVector"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),_(t,b,g),_(t,f,g),e(f,m),e(m,v),M(a,v,null),e(f,p),e(f,T),e(T,Qa),_(t,aa,g),_(t,R,g),e(R,pe),e(pe,vo),M(Oe,vo,null),e(R,Ja),e(R,bo),e(bo,Ga),_(t,na,g),_(t,me,g),e(me,en),e(me,Ve),e(Ve,tn),e(me,on),_(t,sa,g),_(t,Nt,g),e(Nt,an),_(t,ra,g),_(t,Xt,g),e(Xt,wo),e(wo,nn),_(t,ia,g),_(t,It,g),e(It,sn),_(t,la,g),_(t,I,g),e(I,Ne),e(Ne,rn),e(Ne,Ut),e(Ut,ln),e(Ne,dn),e(I,cn),e(I,Xe),e(Xe,pn),e(Xe,Yt),e(Yt,mn),e(Xe,hn),e(I,un),e(I,yo),e(yo,fn),_(t,da,g),_(t,he,g),e(he,gn),e(he,Ie),e(Ie,_n),e(he,vn),_(t,ca,g),_(t,U,g),e(U,bn),e(U,Ue),e(Ue,wn),e(U,yn),e(U,Ye),e(Ye,Mn),e(U,kn),_(t,pa,g),_(t,B,g),e(B,ue),e(ue,Mo),M(He,Mo,null),e(B,$n),e(B,ko),e(ko,Ln),_(t,ma,g),_(t,fe,g),e(fe,$o),e($o,Ht),e(Ht,Wn),e(fe,Tn),e(fe,Lo),e(Lo,Kt),e(Kt,Cn),_(t,ha,g),_(t,Z,g),e(Z,ge),e(ge,Wo),M(Ke,Wo,null),e(Z,jn),e(Z,To),e(To,Fn),_(t,ua,g),_(t,x,g),M(Re,x,null),e(x,xn),e(x,Q),e(Q,qn),e(Q,Rt),e(Rt,En),e(Q,Pn),e(Q,Be),e(Be,An),e(Q,Sn),e(x,zn),e(x,J),e(J,Dn),e(J,Bt),e(Bt,On),e(J,Vn),e(J,Zt),e(Zt,Nn),e(J,Xn),e(x,In),M(_e,x,null),e(x,Un),M(ve,x,null),_(t,fa,g),_(t,G,g),e(G,be),e(be,Co),M(Ze,Co,null),e(G,Yn),e(G,jo),e(jo,Hn),_(t,ga,g),_(t,q,g),M(Qe,q,null),e(q,Kn),e(q,Je),e(Je,Rn),e(Je,Ge),e(Ge,Bn),e(Je,Zn),e(q,Qn),e(q,et),e(et,Jn),e(et,Qt),e(Qt,Gn),e(et,es),e(q,ts),e(q,tt),e(tt,os),e(tt,ot),e(ot,as),e(tt,ns),e(q,ss),e(q,P),M(at,P,null),e(P,rs),e(P,ee),e(ee,is),e(ee,Jt),e(Jt,ls),e(ee,ds),e(ee,Fo),e(Fo,cs),e(ee,ps),e(P,ms),M(we,P,null),e(P,hs),M(ye,P,null),_(t,_a,g),_(t,te,g),e(te,Me),e(Me,xo),M(nt,xo,null),e(te,us),e(te,qo),e(qo,fs),_(t,va,g),_(t,E,g),M(st,E,null),e(E,gs),e(E,oe),e(oe,_s),e(oe,Eo),e(Eo,vs),e(oe,bs),e(oe,rt),e(rt,ws),e(oe,ys),e(E,Ms),e(E,it),e(it,ks),e(it,Gt),e(Gt,$s),e(it,Ls),e(E,Ws),e(E,lt),e(lt,Ts),e(lt,dt),e(dt,Cs),e(lt,js),e(E,Fs),e(E,A),M(ct,A,null),e(A,xs),e(A,ae),e(ae,qs),e(ae,eo),e(eo,Es),e(ae,Ps),e(ae,Po),e(Po,As),e(ae,Ss),e(A,zs),M(ke,A,null),e(A,Ds),M($e,A,null),_(t,ba,g),_(t,ne,g),e(ne,Le),e(Le,Ao),M(pt,Ao,null),e(ne,Os),e(ne,So),e(So,Vs),_(t,wa,g),_(t,C,g),M(mt,C,null),e(C,Ns),e(C,zo),e(zo,Xs),e(C,Is),e(C,ht),e(ht,Us),e(ht,ut),e(ut,Ys),e(ht,Hs),e(C,Ks),e(C,ft),e(ft,Rs),e(ft,to),e(to,Bs),e(ft,Zs),e(C,Qs),e(C,gt),e(gt,Js),e(gt,_t),e(_t,Gs),e(gt,er),e(C,tr),e(C,S),M(vt,S,null),e(S,or),e(S,se),e(se,ar),e(se,oo),e(oo,nr),e(se,sr),e(se,Do),e(Do,rr),e(se,ir),e(S,lr),M(We,S,null),e(S,dr),M(Te,S,null),_(t,ya,g),_(t,re,g),e(re,Ce),e(Ce,Oo),M(bt,Oo,null),e(re,cr),e(re,Vo),e(Vo,pr),_(t,Ma,g),_(t,j,g),M(wt,j,null),e(j,mr),e(j,No),e(No,hr),e(j,ur),e(j,yt),e(yt,fr),e(yt,Mt),e(Mt,gr),e(yt,_r),e(j,vr),e(j,kt),e(kt,br),e(kt,ao),e(ao,wr),e(kt,yr),e(j,Mr),e(j,$t),e($t,kr),e($t,Lt),e(Lt,$r),e($t,Lr),e(j,Wr),e(j,z),M(Wt,z,null),e(z,Tr),e(z,ie),e(ie,Cr),e(ie,no),e(no,jr),e(ie,Fr),e(ie,Xo),e(Xo,xr),e(ie,qr),e(z,Er),M(je,z,null),e(z,Pr),M(Fe,z,null),_(t,ka,g),_(t,le,g),e(le,xe),e(xe,Io),M(Tt,Io,null),e(le,Ar),e(le,Uo),e(Uo,Sr),_(t,$a,g),_(t,F,g),M(Ct,F,null),e(F,zr),e(F,Yo),e(Yo,Dr),e(F,Or),e(F,jt),e(jt,Vr),e(jt,Ft),e(Ft,Nr),e(jt,Xr),e(F,Ir),e(F,xt),e(xt,Ur),e(xt,so),e(so,Yr),e(xt,Hr),e(F,Kr),e(F,qt),e(qt,Rr),e(qt,Et),e(Et,Br),e(qt,Zr),e(F,Qr),e(F,D),M(Pt,D,null),e(D,Jr),e(D,de),e(de,Gr),e(de,ro),e(ro,ei),e(de,ti),e(de,Ho),e(Ho,oi),e(de,ai),e(D,ni),M(qe,D,null),e(D,si),M(Ee,D,null),La=!0},p(t,[g]){const At={};g&2&&(At.$$scope={dirty:g,ctx:t}),_e.$set(At);const Ko={};g&2&&(Ko.$$scope={dirty:g,ctx:t}),ve.$set(Ko);const Ro={};g&2&&(Ro.$$scope={dirty:g,ctx:t}),we.$set(Ro);const Bo={};g&2&&(Bo.$$scope={dirty:g,ctx:t}),ye.$set(Bo);const St={};g&2&&(St.$$scope={dirty:g,ctx:t}),ke.$set(St);const Zo={};g&2&&(Zo.$$scope={dirty:g,ctx:t}),$e.$set(Zo);const Qo={};g&2&&(Qo.$$scope={dirty:g,ctx:t}),We.$set(Qo);const Jo={};g&2&&(Jo.$$scope={dirty:g,ctx:t}),Te.$set(Jo);const zt={};g&2&&(zt.$$scope={dirty:g,ctx:t}),je.$set(zt);const Go={};g&2&&(Go.$$scope={dirty:g,ctx:t}),Fe.$set(Go);const ea={};g&2&&(ea.$$scope={dirty:g,ctx:t}),qe.$set(ea);const ta={};g&2&&(ta.$$scope={dirty:g,ctx:t}),Ee.$set(ta)},i(t){La||(k(a.$$.fragment,t),k(Oe.$$.fragment,t),k(He.$$.fragment,t),k(Ke.$$.fragment,t),k(Re.$$.fragment,t),k(_e.$$.fragment,t),k(ve.$$.fragment,t),k(Ze.$$.fragment,t),k(Qe.$$.fragment,t),k(at.$$.fragment,t),k(we.$$.fragment,t),k(ye.$$.fragment,t),k(nt.$$.fragment,t),k(st.$$.fragment,t),k(ct.$$.fragment,t),k(ke.$$.fragment,t),k($e.$$.fragment,t),k(pt.$$.fragment,t),k(mt.$$.fragment,t),k(vt.$$.fragment,t),k(We.$$.fragment,t),k(Te.$$.fragment,t),k(bt.$$.fragment,t),k(wt.$$.fragment,t),k(Wt.$$.fragment,t),k(je.$$.fragment,t),k(Fe.$$.fragment,t),k(Tt.$$.fragment,t),k(Ct.$$.fragment,t),k(Pt.$$.fragment,t),k(qe.$$.fragment,t),k(Ee.$$.fragment,t),La=!0)},o(t){$(a.$$.fragment,t),$(Oe.$$.fragment,t),$(He.$$.fragment,t),$(Ke.$$.fragment,t),$(Re.$$.fragment,t),$(_e.$$.fragment,t),$(ve.$$.fragment,t),$(Ze.$$.fragment,t),$(Qe.$$.fragment,t),$(at.$$.fragment,t),$(we.$$.fragment,t),$(ye.$$.fragment,t),$(nt.$$.fragment,t),$(st.$$.fragment,t),$(ct.$$.fragment,t),$(ke.$$.fragment,t),$($e.$$.fragment,t),$(pt.$$.fragment,t),$(mt.$$.fragment,t),$(vt.$$.fragment,t),$(We.$$.fragment,t),$(Te.$$.fragment,t),$(bt.$$.fragment,t),$(wt.$$.fragment,t),$(Wt.$$.fragment,t),$(je.$$.fragment,t),$(Fe.$$.fragment,t),$(Tt.$$.fragment,t),$(Ct.$$.fragment,t),$(Pt.$$.fragment,t),$(qe.$$.fragment,t),$(Ee.$$.fragment,t),La=!1},d(t){o(d),t&&o(b),t&&o(f),L(a),t&&o(aa),t&&o(R),L(Oe),t&&o(na),t&&o(me),t&&o(sa),t&&o(Nt),t&&o(ra),t&&o(Xt),t&&o(ia),t&&o(It),t&&o(la),t&&o(I),t&&o(da),t&&o(he),t&&o(ca),t&&o(U),t&&o(pa),t&&o(B),L(He),t&&o(ma),t&&o(fe),t&&o(ha),t&&o(Z),L(Ke),t&&o(ua),t&&o(x),L(Re),L(_e),L(ve),t&&o(fa),t&&o(G),L(Ze),t&&o(ga),t&&o(q),L(Qe),L(at),L(we),L(ye),t&&o(_a),t&&o(te),L(nt),t&&o(va),t&&o(E),L(st),L(ct),L(ke),L($e),t&&o(ba),t&&o(ne),L(pt),t&&o(wa),t&&o(C),L(mt),L(vt),L(We),L(Te),t&&o(ya),t&&o(re),L(bt),t&&o(Ma),t&&o(j),L(wt),L(Wt),L(je),L(Fe),t&&o(ka),t&&o(le),L(Tt),t&&o($a),t&&o(F),L(Ct),L(Pt),L(qe),L(Ee)}}}const Sl={local:"wavlm",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.WavLMConfig",title:"WavLMConfig"},{local:"transformers.WavLMModel",title:"WavLMModel"},{local:"transformers.WavLMForCTC",title:"WavLMForCTC"},{local:"transformers.WavLMForSequenceClassification",title:"WavLMForSequenceClassification"},{local:"transformers.WavLMForAudioFrameClassification",title:"WavLMForAudioFrameClassification"},{local:"transformers.WavLMForXVector",title:"WavLMForXVector"}],title:"WavLM"};function zl(W){return Ml(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ul extends vl{constructor(d){super();bl(this,d,zl,Al,wl,{})}}export{Ul as default,Sl as metadata};
