Skip to content

Commit 4791084

Browse files
committed
PyThaiASR v1.0.1
- Fixed bug import
1 parent d8ccc0e commit 4791084

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ asr(file: str, show_pad: bool = False, model: str = "airesearch/wav2vec2-large-x
4747

4848
**Options for model**
4949
- *airesearch/wav2vec2-large-xlsr-53-th* (default) - AI RESEARCH - PyThaiNLP model
50-
- **wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model
50+
- *wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model
5151
- *wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model
5252

5353
You can read about models from the list:

pythaiasr/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def __call__(self, file: str, tokenized: bool = False) -> str:
5454
pred_ids = torch.argmax(logits, dim=-1)[0]
5555

5656
if tokenized:
57-
txt = self.processor.decode(pred_ids)
57+
txt = self.processor.batch_decode(logits.detach().numpy()).text
5858
else:
59-
txt = self.processor.decode(pred_ids).replace(' ','')
59+
txt = self.processor.batch_decode(logits.detach().numpy()).text.replace(' ','')
6060
return txt
6161

6262
_model_name = "airesearch/wav2vec2-large-xlsr-53-th"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def read(*paths):
2727

2828
setup(
2929
name='pythaiasr',
30-
version='1.0.0',
30+
version='1.0.1',
3131
packages=['pythaiasr'],
3232
url='https://github.com/pythainlp/pythaiasr',
3333
license='Apache Software License 2.0',

0 commit comments

Comments
 (0)