Skip to content

Commit

Permalink
Update model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautam-Rajeev authored Apr 9, 2024
1 parent 1f4d19d commit 85c736b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/asr/fairseq_mms/local/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async def inference(self, request: ModelRequest):
wav_file = request.wav_file
ory_sample, sr = librosa.load(wav_file, sr=16000)
inputs = self.processor(ory_sample, sampling_rate=16_000, return_tensors="pt")
inputs = inputs.to(self.device)
with torch.no_grad():
outputs = self.model(**inputs).logits

Expand Down

0 comments on commit 85c736b

Please sign in to comment.