# Question about Wav2vec2

**URL:** <https://discuss.huggingface.co/t/question-about-wav2vec2/17620>\
**Category:** Models\
**Created:** [May 6, 2022, 4:16pm UTC](https://discuss.huggingface.co/t/question-about-wav2vec2/17620 "2022-05-06T16:16:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedlone123](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ahmedlone123](https://discuss.huggingface.co/u/ahmedlone123)\
**Post date:** [May 6, 2022, 4:16pm UTC](https://discuss.huggingface.co/t/question-about-wav2vec2/17620/1 "2022-05-06T16:16:39Z")

</div>

hey @sgugger

I wanted to know what’s up with Wav2vec2 [facebook/wav2vec2-base-960h · Hugging Face](https://huggingface.co/facebook/wav2vec2-base-960h) and  
[facebook/wav2vec2-base · Hugging Face](https://huggingface.co/facebook/wav2vec2-base) I was looking into the model files and saw that a padding value had been specified but when I use the preprocessor it seems like it totally ignores the instructions in the preprocessor config and passing values to the processor call does not help either. I want to know where does the processor get the padding value if not from the processor config

My code :

```auto
 from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
 from datasets import load_dataset
 import soundfile as sf
 import torch
 
# load model and tokenizer
processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-base")

input_values3 = processor(x, return_tensors="pt", padding="longest").input_values # Batch size 1

input_values3

```

Also, another question does each Wav2vec2 model have its own way of normalizing/processing audio because I passed the same audio to [jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn · Hugging Face](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn)

and it gave me different results,my code :

```auto
 from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
 from datasets import load_dataset
 import soundfile as sf
 import torch
 
# load model and tokenizer
processor = Wav2Vec2Processor.from_pretrained("jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn")

input_values = processor(x, return_tensors="pt", padding="longest").input_values # Batch size 1

input_values

```

---

<div class="post-metadata">

**Author:** ![ahmedlone123](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ahmedlone123](https://discuss.huggingface.co/u/ahmedlone123)\
**Post date:** [May 6, 2022, 9:48pm UTC](https://discuss.huggingface.co/t/question-about-wav2vec2/17620/2 "2022-05-06T21:48:19Z")

</div>

I was playing around with Wav2vec2 a bit more and there were a few more things I noticed that were off, firstly in the Wav2vec2Procesor whenever we pad, we then apply the normalization which in turn changes the padded value per sequence. Would it not make more sense to let the padded value be as is and apply the normalization before the padding? Also, Some parameters like `padded_value` and `do_normalize` do not work either. I tried saying `do_normalize = False ` but it still normalized. In the same case with `padded_value`, I tried passing a few different values but the output from the processor did not change one bit. I think this is because we do not pass the padded\_value to the pad function

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/5/5ecc74dbd5cdb25211a4abfd1d448c50aeb2b650.png)

Shouldn’t we pass the other parameters here as well?

Let me know where I am wrong, I am not very experienced with ML/DL models yet so all of this might be just my misunderstanding
