ModelScope Model
How to finetune and infer using a pretrained Paraformer-large Model
Finetune
Modify finetune training related parameters in
finetune.py
output_dir: # result dir
data_dir: # the dataset dir needs to include files: train/wav.scp, train/text; validation/wav.scp, validation/text.
batch_bins: # batch size
max_epoch: # number of training epoch
lr: # learning rate
Then you can run the pipeline to finetune with:
python finetune.py
Inference
Or you can use the finetuned model for inference directly.
Setting parameters in
infer.py
data_dir: # the dataset dir
output_dir: # result dir
Then you can run the pipeline to infer with:
python infer.py