funasr1.0 fsmn-vad streaming
| | |
| | | |
| | | from funasr import AutoModel |
| | | |
| | | model = AutoModel(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revison="v2.0.0") |
| | | model = AutoModel(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revision="v2.0.0") |
| | | |
| | | res = model(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav") |
| | | print(res) |
| | |
| | | |
| | | from funasr import AutoFrontend |
| | | |
| | | frontend = AutoFrontend(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revison="v2.0.0") |
| | | frontend = AutoFrontend(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revision="v2.0.0") |
| | | |
| | | fbanks = frontend(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav", batch_size=2) |
| | | |
| | |
| | | encoder_chunk_look_back = 4 #number of chunks to lookback for encoder self-attention |
| | | decoder_chunk_look_back = 1 #number of encoder chunks to lookback for decoder cross-attention |
| | | |
| | | model = AutoModel(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online", model_revison="v2.0.0") |
| | | model = AutoModel(model="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online", model_revision="v2.0.0") |
| | | cache = {} |
| | | res = model(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav", |
| | | chunk_size=chunk_size, |
| | |
| | | |
| | | return key_list, data_list |
| | | |
| | | @hydra.main(config_name=None, version_base=None) |
| | | @hydra.main(config_name=None) |
| | | def main_hydra(cfg: DictConfig): |
| | | def to_plain_list(cfg_item): |
| | | if isinstance(cfg_item, ListConfig): |
| | |
| | | from funasr.download.download_from_hub import download_model |
| | | from funasr.register import tables |
| | | |
| | | @hydra.main(config_name=None, version_base=None) |
| | | @hydra.main(config_name=None) |
| | | def main_hydra(kwargs: DictConfig): |
| | | if kwargs.get("debug", False): |
| | | import pdb; pdb.set_trace() |
| | |
| | | "hdbscan", |
| | | "umap", |
| | | "jaconv", |
| | | "hydra-core", |
| | | "hydra-core>=1.3.2", |
| | | ], |
| | | # train: The modules invoked when training only. |
| | | "train": [ |