File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pip install pythaiasr
1919```
2020
2121** For Wav2Vec2 with language model:**
22- if you want to use wannaphong/wav2vec2-large-xlsr-53-th-cv8-* model, you needs to install by the step.
22+ if you want to use wannaphong/wav2vec2-large-xlsr-53-th-cv8-* model with language model , you needs to install by the step.
2323
2424``` sh
2525pip install pythaiasr[lm]
@@ -37,17 +37,19 @@ print(asr(file))
3737### API
3838
3939``` python
40- asr(file : str , model: str = " airesearch/wav2vec2-large-xlsr-53-th " )
40+ asr(file : str , model: str = _model_name, lm: bool = False , device: str = None )
4141```
4242
4343- file: path of sound file
4444- model: The ASR model
45+ - lm: Use language model (except * airesearch/wav2vec2-large-xlsr-53-th* model)
46+ - device: device
4547- return: thai text from ASR
4648
4749** Options for model**
4850- * airesearch/wav2vec2-large-xlsr-53-th* (default) - AI RESEARCH - PyThaiNLP model
49- - * 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-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model
51+ - * wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer)
52+ - * wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer)
5153
5254You can read about models from the list:
5355
You can’t perform that action at this time.
0 commit comments