Skip to content

Commit

Permalink
Fixed #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong authored Mar 15, 2022
1 parent 9dba9d8 commit 85360f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pythaiasr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def asr(file: str, tokenized: bool = False) -> str:
b['path'] = file
a = prepare_dataset(resample(speech_file_to_array_fn(b)))
input_dict = processor(a["input_values"][0], return_tensors="pt", padding=True)
logits = model(input_dict.input_values.to(device)).logits
logits = model(input_dict.input_values).logits
pred_ids = torch.argmax(logits, dim=-1)[0]

if tokenized:
Expand Down

0 comments on commit 85360f9

Please sign in to comment.