seaco paraformer inference
2个文件已添加
5 文件已重命名
1个文件已删除
1 文件已复制
| New file |
| | |
| | | #!/usr/bin/env python3 |
| | | # -*- encoding: utf-8 -*- |
| | | # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved. |
| | | # MIT License (https://opensource.org/licenses/MIT) |
| | | |
| | | from funasr import AutoModel |
| | | |
| | | model = AutoModel(model="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404") |
| | | |
| | | res = model(input="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404/example/asr_example.wav", |
| | | hotword='达魔院 魔搭') |
| | | print(res) |
| File was renamed from examples/industrial_data_pretraining/neat_contextual_paraformer/infer.sh |
| | |
| | | |
| | | # download model |
| | | local_path_root=./modelscope_models |
| | | local_path_root=../modelscope_models |
| | | mkdir -p ${local_path_root} |
| | | local_path=${local_path_root}/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404 |
| | | git clone https://www.modelscope.cn/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404.git ${local_path} |
| New file |
| | |
| | | #!/usr/bin/env python3 |
| | | # -*- encoding: utf-8 -*- |
| | | # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved. |
| | | # MIT License (https://opensource.org/licenses/MIT) |
| | | |
| | | from funasr import AutoModel |
| | | |
| | | model = AutoModel(model="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404") |
| | | |
| | | res = model(input="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404/example/asr_example.wav", |
| | | hotword='达魔院 魔搭') |
| | | print(res) |
copy from examples/industrial_data_pretraining/neat_contextual_paraformer/infer.sh
copy to examples/industrial_data_pretraining/seaco_paraformer/infer.sh
| File was copied from examples/industrial_data_pretraining/neat_contextual_paraformer/infer.sh |
| | |
| | | |
| | | # download model |
| | | local_path_root=./modelscope_models |
| | | local_path_root=../modelscope_models |
| | | mkdir -p ${local_path_root} |
| | | local_path=${local_path_root}/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404 |
| | | git clone https://www.modelscope.cn/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404.git ${local_path} |
| | | git clone https://www.modelscope.cn/damo/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git ${local_path} |
| | | |
| | | |
| | | python funasr/bin/inference.py \ |
| File was renamed from funasr/models/neat_contextual_paraformer/model.py |
| | |
| | | |
| | | from funasr.register import tables |
| | | |
| | | @tables.register("model_classes", "NeatContextualParaformer") |
| | | class NeatContextualParaformer(Paraformer): |
| | | @tables.register("model_classes", "ContextualParaformer") |
| | | class ContextualParaformer(Paraformer): |
| | | """ |
| | | Author: Speech Lab of DAMO Academy, Alibaba Group |
| | | Paraformer: Fast and Accurate Parallel Transformer for Non-autoregressive End-to-End Speech Recognition |
| File was renamed from funasr/models/neat_contextual_paraformer/template.yaml |
| | |
| | | # tables.print() |
| | | |
| | | # network architecture |
| | | model: NeatContextualParaformer |
| | | model: ContextualParaformer |
| | | model_conf: |
| | | ctc_weight: 0.0 |
| | | lsm_weight: 0.1 |