Audio-Text-to-Text
Transformers
Safetensors
qwen2_audio
text2text-generation
Inference Endpoints
jimbozhang commited on
Commit
2d1002f
·
verified ·
1 Parent(s): cefa606

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -27,8 +27,9 @@ model = Qwen2AudioForConditionalGeneration.from_pretrained(model_name, torch_dty
27
 
28
  # Load example audio
29
  wav_path = "test-mini-audios/3fe64f3d-282c-4bc8-a753-68f8f6c35652.wav" # from MMAU dataset
30
- waveform, _ = torchaudio.load(wav_path) # 16KHz
31
- audios = [waveform[0].numpy()]
 
32
 
33
  # Make prompt text
34
  question = "Based on the given audio, identify the source of the speaking voice."
 
27
 
28
  # Load example audio
29
  wav_path = "test-mini-audios/3fe64f3d-282c-4bc8-a753-68f8f6c35652.wav" # from MMAU dataset
30
+ waveform, sampling_rate = torchaudio.load(wav_path)
31
+ assert sampling_rate == 16000
32
+ audios = [waveform.numpy()]
33
 
34
  # Make prompt text
35
  question = "Based on the given audio, identify the source of the speaking voice."