Skip to content

Commit

Permalink
Small fix to cuda use
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyuan Li committed Jan 26, 2024
1 parent 55b22f6 commit bc3c432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion art/estimators/speech_recognition/pytorch_icefall.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def predict(self, x: np.ndarray, batch_size: int = 1, **kwargs) -> np.ndarray:

# extract features
x, _, _ = self.transform_model_input(x=torch.tensor(wav))
shape = torch.tensor([x.shape[1]])
shape = torch.tensor([x.shape[1]]).to(self.device)

encoder_out, encoder_out_lens = self.transducer_model.encoder(x=x, x_lens=shape)
hyp = greedy_search(model=self.transducer_model, encoder_out=encoder_out, id2word=self.get_id2word)
Expand Down

0 comments on commit bc3c432

Please sign in to comment.