flaubert commited on
Commit
7e45da3
·
verified ·
1 Parent(s): 62de87b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -55,7 +55,6 @@ from transformers import AutoProcessor, AutoModel
55
 
56
  # load model
57
  model_name = "PantagrueLLM/speech-base-14K"
58
- # Note: please normalize the audio if not using AutoProcessor
59
  processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
60
  model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
61
  model.eval()
@@ -63,6 +62,7 @@ model.eval()
63
  # load audio files
64
  wav, curr_sample_rate = sf.read("audio.wav", dtype="float32")
65
  feats = torch.from_numpy(wav).float()
 
66
  inputs = processor(feats, sampling_rate=16000, return_tensors="pt")
67
 
68
  # extract features
 
55
 
56
  # load model
57
  model_name = "PantagrueLLM/speech-base-14K"
 
58
  processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
59
  model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
60
  model.eval()
 
62
  # load audio files
63
  wav, curr_sample_rate = sf.read("audio.wav", dtype="float32")
64
  feats = torch.from_numpy(wav).float()
65
+ # Note: please normalize the audio if not using AutoProcessor
66
  inputs = processor(feats, sampling_rate=16000, return_tensors="pt")
67
 
68
  # extract features