Question 1
Consider the following code using Wav2Vec2Processor to process an audio sample:
import torchfrom transformers import Wav2Vec2Processor
processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-base-960h")
sample_audio = {"array": torch.randn(12000), "sampling_rate": 16000}
inputs = processor(sample_audio["array"], sampling_rate=16000, return_tensors="pt", padding=True)
print(inputs["input_values"].shape)What will the printed shape be?
(1, 16000)
(1, X), where X depends on the model
(1, 12000)
Error: Wav2Vec2Processor does not support PyTorch tensors