flaubert commited on
Commit
f39d465
·
verified ·
1 Parent(s): a49c972

Update README.md

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