From 85360f9c58247c2cff9b057507101ee5f6846232 Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Tue, 15 Mar 2022 20:27:37 +0700 Subject: [PATCH] Fixed #4 --- pythaiasr/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythaiasr/__init__.py b/pythaiasr/__init__.py index 25d1c42..cc4d73e 100644 --- a/pythaiasr/__init__.py +++ b/pythaiasr/__init__.py @@ -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: