Upload 25 files
Browse filesFiles changed (26)
- .gitattributes+5
- preprocessors/.gitattributesAdded+40
- preprocessors/README.mdAdded+3
- preprocessors/dereverb_mel_band_roformer/dereverb_mel_band_roformer_anvuew.yamlAdded+76
- preprocessors/dereverb_mel_band_roformer/dereverb_mel_band_roformer_anvuew_sdr_19.1729.ckptAdded+3
- preprocessors/mel-band-roformer-karaoke/config_karaoke_becruily.yamlAdded+72
- preprocessors/mel-band-roformer-karaoke/mel_band_roformer_karaoke_becruily.ckptAdded+3
- preprocessors/parakeet-tdt-0.6b-v2/parakeet-tdt-0.6b-v2.nemoAdded+3
- preprocessors/rmvpe/rmvpe.ptAdded+3
- preprocessors/rosvot/rmvpe/model.ptAdded+3
- preprocessors/rosvot/rosvot/config.yamlAdded+159
- preprocessors/rosvot/rosvot/model.ptAdded+3
- preprocessors/rosvot/rwbd/config.yamlAdded+171
- preprocessors/rosvot/rwbd/model.ptAdded+3
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/README.mdAdded+357
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvnAdded+8
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/asr_example_hotword.wavAdded+3
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/config.yamlAdded+160
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/configuration.jsonAdded+14
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/asr_example.wavAdded+3
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/hotword.txtAdded+1
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/res.pngAdded
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/seaco.pngAdded
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.ptAdded+3
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/seg_dictAdded
- preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/tokens.jsonAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363738394032 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textpreprocessors/parakeet-tdt-0.6b-v2/parakeet-tdt-0.6b-v2.nemo filter=lfs diff=lfs merge=lfs -textpreprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/asr_example_hotword.wav filter=lfs diff=lfs merge=lfs -textpreprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/asr_example.wav filter=lfs diff=lfs merge=lfs -textpreprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/res.png filter=lfs diff=lfs merge=lfs -textpreprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/seaco.png filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textparakeet-tdt-0.6b-v2/parakeet-tdt-0.6b-v2.nemo filter=lfs diff=lfs merge=lfs -textspeech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/asr_example_hotword.wav filter=lfs diff=lfs merge=lfs -textspeech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/asr_example.wav filter=lfs diff=lfs merge=lfs -textspeech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/res.png filter=lfs diff=lfs merge=lfs -textspeech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/seaco.png filter=lfs diff=lfs merge=lfs -text123---
license: apache-2.0
---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576audio: chunk_size: 352800 dim_f: 1024 dim_t: 256 hop_length: 441 n_fft: 2048 num_channels: 2 sample_rate: 44100 min_mean_abs: 0.000
model: dim: 384 depth: 6 stereo: true num_stems: 1 time_transformer_depth: 1 freq_transformer_depth: 1 num_bands: 60 dim_head: 64 heads: 8 attn_dropout: 0 ff_dropout: 0 flash_attn: True dim_freqs_in: 1025 sample_rate: 44100 # needed for mel filter bank from librosa stft_n_fft: 2048 stft_hop_length: 441 stft_win_length: 2048 stft_normalized: False mask_estimator_depth: 2 multi_stft_resolution_loss_weight: 1.0 multi_stft_resolutions_window_sizes: !!python/tuple - 4096 - 2048 - 1024 - 512 - 256 multi_stft_hop_size: 147 multi_stft_normalized: False
training: batch_size: 3 gradient_accumulation_steps: 1 grad_clip: 0 instruments: - noreverb - reverb lr: 5.0e-05 patience: 2 reduce_factor: 0.95 target_instrument: noreverb num_epochs: 1000 num_steps: 4000 q: 0.95 coarse_loss_clip: false ema_momentum: 0.999 optimizer: adamw other_fix: true # it's needed for checking on multisong dataset if other is actually instrumental use_amp: true # enable or disable usage of mixed precision (float16) - usually it must be true
augmentations: enable: true # enable or disable all augmentations (to fast disable if needed) loudness: true # randomly change loudness of each stem on the range (loudness_min; loudness_max) loudness_min: 0.1 loudness_max: 1.0 mixup: false # mix several stems of same type with some probability (only works for dataset types: 1, 2, 3) mixup_probs: !!python/tuple # 2 additional stems of the same type (1st with prob 0.2, 2nd with prob 0.02) - 0.2 - 0.02 mixup_loudness_min: 0.5 mixup_loudness_max: 1.5
inference: batch_size: 8 dim_t: 801 num_overlap: 2123version https://git-lfs.github.com/spec/v1oid sha256:9262877b87e9ebb0fb808a456b0a411fa677f5df31c8383c1254af531c078970size 913107578123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172audio: chunk_size: 485100 dim_f: 1024 dim_t: 256 hop_length: 441 n_fft: 2048 num_channels: 2 sample_rate: 44100 min_mean_abs: 0.000
model: dim: 384 depth: 6 stereo: true num_stems: 2 time_transformer_depth: 1 freq_transformer_depth: 1 num_bands: 60 dim_head: 64 heads: 8 attn_dropout: 0 ff_dropout: 0 flash_attn: true dim_freqs_in: 1025 sample_rate: 44100 # needed for mel filter bank from librosa stft_n_fft: 2048 stft_hop_length: 441 stft_win_length: 2048 stft_normalized: false mask_estimator_depth: 2 multi_stft_resolution_loss_weight: 1.0 multi_stft_resolutions_window_sizes: !!python/tuple - 4096 - 2048 - 1024 - 512 - 256 multi_stft_hop_size: 147 multi_stft_normalized: false
training: batch_size: 1 gradient_accumulation_steps: 1 grad_clip: 0 instruments: - Vocals - Instrumental lr: 0.0005 patience: 2 reduce_factor: 0.95 target_instrument: null num_epochs: 1000 num_steps: 1000 augmentation: false # enable augmentations by audiomentations and pedalboard augmentation_type: use_mp3_compress: false # Deprecated augmentation_mix: false # Mix several stems of the same type with some probability augmentation_loudness: false # randomly change loudness of each stem augmentation_loudness_type: 1 # Type 1 or 2 augmentation_loudness_min: 0 augmentation_loudness_max: 0 q: 0.95 coarse_loss_clip: false ema_momentum: 0.999 optimizer: adamw other_fix: false # it's needed for checking on multisong dataset if other is actually instrumental use_amp: true # enable or disable usage of mixed precision (float16) - usually it must be true
inference: batch_size: 8 dim_t: 1101 num_overlap: 2123version https://git-lfs.github.com/spec/v1oid sha256:d3aa262ac01df870b9fc033e9c7b6cad33fe04fc9c148b6c40841326a515a0e0size 1719139254123version https://git-lfs.github.com/spec/v1oid sha256:d99e39955c9d3d0350d8fb7c75e40c64a2b2eaeb003883d7c941fd2e8747b28csize 2472222720123version https://git-lfs.github.com/spec/v1oid sha256:6d62215f4306e3ca278246188607209f09af3dc77ed4232efdd069798c4ec193size 181184272123version https://git-lfs.github.com/spec/v1oid sha256:19dc1809cf4cdb0a18db93441816bc327e14e5644b72eeaae5220560c6736fe2size 368492925123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159accumulate_grad_batches: 1amp: falseaudio_num_mel_bins: 80audio_sample_rate: 24000base_config:- ./base.yamlbinarization_args: min_sil_duration: 0.1 shuffle: false test_range: - 0 - 100 train_range: - 200 - -1 trim_eos_bos: false valid_range: - 100 - 200 with_align: true with_f0: true with_f0cwt: false with_linear: false with_mel: false with_spk_embed: false with_w2v2_feat: false with_wav: truebinarizer_cls: data_gen.rosvot_binarizer.ROSVOTBinarizerbinary_data_dir: data/binary/m4bkb_layers: 2bkb_net: conformerchannel_multiples: 1-1-1-1check_val_every_n_epoch: 10clip_grad_norm: 1clip_grad_value: 0conformer_kernel: 9dataset_downsample_rate: 1.0debug: falsedropout: 0.1ds_names: m4ds_names_in_testing: ''ds_names_in_training: ''ds_workers: 8endless_ds: trueeval_max_batches: -1f0_add_noise: gaussian:0.04f0_bin: 512f0_filepath: ''f0_max: 12000f0_min: 30fft_size: 512find_unused_parameters: truefmax: 12000fmin: 30frames_multiple: 16gen_dir_name: ''hidden_size: 256hop_size: 128infer_meta_path: ''infer_print_skipped: trueinfer_regulate_real_note_itv: trueinput_process_name: nonelabel_pos_weight_decay: 0.95lambda_note_bd: 1.0lambda_note_bd_focal: 3.0lambda_note_bd_slur_punish: 0.0lambda_note_pitch: 1.0load_ckpt: ''loud_norm: falselr: 1.0e-05max_epochs: 1000max_frames: 4000max_input_tokens: 1550max_sentences: 32max_tokens: 60000max_updates: 60000max_valid_sentences: 1max_valid_tokens: 60000mel_add_noise: gaussian:0.05mel_vmax: 1.5mel_vmin: -6min_frames: 0min_word_dur: 20model: rosvotnoise_in_test: falsenoise_prob: 0.8noise_snr: 6-20note_bd_add_noise: gaussian:0.002note_bd_focal_loss: 5.0note_bd_min_gap: 90note_bd_ratio: 2.42312note_bd_ref_min_gap: 40note_bd_start: 0note_bd_temperature: 0.2note_bd_threshold: 0.8note_num: 85note_pitch_label_smoothing: 0.005note_pitch_start: 0note_pitch_temperature: 0.01note_start: 30note_type_num: 5num_ckpt_keep: 3num_sanity_val_steps: 5num_valid_plots: 10num_valid_stats: 100optimizer_adam_beta1: 0.9optimizer_adam_beta2: 0.98out_wav_norm: falsepe: rmvpepe_ckpt: pretrained_models/rosvot/rmvpe/model.ptpin_memory: truepitch_attn_num_head: 4pitch_type: frameprint_nan_grads: falseprocessed_data_dir: data/processed/m4profile_infer: falseraw_data_dir: ''rename_tmux: falseresume_from_checkpoint: 0save_best: truesave_codes:- modules- researchsave_f0: falsesave_gt: truesave_plot: truescheduler: step_lrscheduler_lr_gamma: 0.998scheduler_lr_step_size: 500seed: 42soft_note_bd_func: gaussian:80sort_by_len: truetask_cls: tasks.rosvot.task.MidiExtractorTasktb_log_interval: 100test_ids: []test_input_yaml: ''test_set_name: testtrain_set_name: traintrain_sets: ''unet_skip_layer: falseupdown_rates: 2-2-2-2use_mel: trueuse_mel_bins: 40use_pitch_embed: trueuse_soft_note: falseuse_soft_note_bd: trueuse_spk_embed: falseuse_spk_id: falseuse_wav: falseuse_word_input: falseval_check_interval: 1000valid_infer_interval: 10000valid_monitor_key: val_lossvalid_monitor_mode: minvalid_set_name: validwarmup_updates: 0weight_decay: 0win_size: 512work_dir: checkpoints/rosvot123version https://git-lfs.github.com/spec/v1oid sha256:7501fb5f913d971c2f51bcb3063b930027b03206581820a4d2bfdc394c9c3fcbsize 144674420123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171accumulate_grad_batches: 1amp: falseaudio_num_mel_bins: 80audio_sample_rate: 24000base_config:- ./base.yaml- ./rosvot.yamlbinarization_args: min_sil_duration: 0.1 shuffle: false test_range: - 0 - 100 train_range: - 200 - -1 trim_eos_bos: false valid_range: - 100 - 200 with_align: true with_f0: true with_f0cwt: false with_linear: false with_mel: false with_spk_embed: false with_w2v2_feat: false with_wav: truebinarizer_cls: data_gen.rosvot_binarizer.RosvotBinarizerbinary_data_dir: data/binary/m4bkb_layers: 2bkb_net: conformerchannel_multiples: 1-1-1check_val_every_n_epoch: 10clip_grad_norm: 1clip_grad_value: 0conformer_kernel: 9dataset_downsample_rate: 1.0debug: falsedropout: 0.1ds_names: m4ds_names_in_testing: ''ds_names_in_training: ''ds_workers: 8endless_ds: trueeval_max_batches: -1f0_add_noise: gaussian:0.04f0_bin: 512f0_filepath: ''f0_max: 900f0_min: 50fft_size: 512find_unused_parameters: truefmax: 12000fmin: 30frames_multiple: 8gen_dir_name: ''hidden_size: 256hop_size: 128infer_meta_path: ''infer_print_skipped: trueinfer_regulate_real_note_itv: trueinput_process_name: nonelabel_pos_weight_decay: 0.95lambda_note_bd: 1.0lambda_note_bd_focal: 3.0lambda_note_bd_slur_punish: 0.0lambda_note_pitch: 1.0lambda_word_bd: 1.0lambda_word_bd_focal: 3.0load_ckpt: ''loud_norm: falselr: 5.0e-06max_epochs: 1000max_frames: 4000max_input_tokens: 1550max_sentences: 128max_tokens: 80000max_updates: 40000max_valid_sentences: 1max_valid_tokens: 60000mel_add_noise: gaussian:0.05mel_vmax: 1.5mel_vmin: -6min_frames: 0min_note_dur: 80min_word_dur: 20model: rosvotnoise_in_test: falsenoise_prob: 0.8noise_snr: 6-20note_bd_add_noise: gaussian:0.002note_bd_focal_loss: 5.0note_bd_min_gap: 90note_bd_ratio: 2.42312note_bd_ref_min_gap: 40note_bd_start: 0note_bd_temperature: 0.2note_bd_threshold: 0.8note_num: 85note_pitch_label_smoothing: 0.005note_pitch_start: 0note_pitch_temperature: 0.01note_start: 30num_ckpt_keep: 3num_sanity_val_steps: 5num_valid_plots: 10num_valid_stats: 100optimizer_adam_beta1: 0.9optimizer_adam_beta2: 0.98out_wav_norm: falsepe: rmvpepe_ckpt: checkpoints/rmvpe/model.ptpin_memory: truepitch_attn_num_head: 4pitch_type: frameprint_nan_grads: falseprocessed_data_dir: data/processed/m4profile_infer: falseraw_data_dir: ''rename_tmux: falseresume_from_checkpoint: 0save_best: truesave_codes:- modules- taskssave_f0: falsesave_gt: truesave_plot: truescheduler: step_lrscheduler_lr_gamma: 0.998scheduler_lr_step_size: 500seed: 42soft_note_bd_func: gaussian:80soft_word_bd_func: gaussian:80sort_by_len: truetask_cls: tasks.rosvot.task.RobustWordbdTasktb_log_interval: 100test_ids: []test_input_yaml: ''test_set_name: testtrain_set_name: traintrain_sets: ''unet_skip_layer: falseupdown_rates: 2-2-2use_mel: trueuse_mel_bins: 40use_pitch_embed: trueuse_soft_note: falseuse_soft_note_bd: trueuse_soft_word_bd: trueuse_spk_embed: falseuse_spk_id: falseuse_wav: falseuse_word_input: falseval_check_interval: 500valid_infer_interval: 10000valid_monitor_key: val_lossvalid_monitor_mode: minvalid_set_name: validwarmup_updates: 0weight_decay: 0win_size: 512word_bd_add_noise: gaussian:0.002word_bd_focal_loss: 5.0word_bd_min_gap: 90word_bd_ratio: 2.2word_bd_start: 0word_bd_temperature: 0.2word_bd_threshold: 0.9work_dir: checkpoints/240613-rwbd-03123version https://git-lfs.github.com/spec/v1oid sha256:0bc2d42a6d4b7a05436deb937e2deda1c12de49e5687cfda0bdf6a430120dcd2size 119897457123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357---tasks:- auto-speech-recognitiondomain:- audiomodel-type:- Non-autoregressiveframeworks:- pytorchbackbone:- transformer/conformermetrics:- CERlicense: Apache License 2.0language: - cntags:- FunASR- Paraformer- Alibaba- ICASSP2024- Hotworddatasets: train: - 50,000 hour industrial Mandarin task test: - AISHELL-1-hotword dev/testindexing: results: - task: name: Automatic Speech Recognition dataset: name: 50,000 hour industrial Mandarin task type: audio # optional args: 16k sampling rate, 8404 characters # optional metrics: - type: CER value: 8.53% # float description: greedy search, withou lm, avg. args: default - type: RTF value: 0.0251 # float description: GPU inference on V100 args: batch_size=1widgets: - task: auto-speech-recognition inputs: - type: audio name: input title: 音频 parameters: - name: hotword title: 热词 type: string examples: - name: 1 title: 示例1 inputs: - name: input data: git://example/asr_example.wav parameters: - name: hotword value: 魔搭 model_revision: v2.0.4 inferencespec: cpu: 8 #CPU数量 memory: 4096---
# Paraformer-large模型介绍
## HighlightsParaformer-large热词版模型支持热词定制功能:实现热词定制化功能,基于提供的热词列表进行激励增强,提升热词的召回率和准确率。
## <strong>[FunASR开源项目介绍](https://github.com/alibaba-damo-academy/FunASR)</strong><strong>[FunASR](https://github.com/alibaba-damo-academy/FunASR)</strong>希望在语音识别的学术研究和工业应用之间架起一座桥梁。通过发布工业级语音识别模型的训练和微调,研究人员和开发人员可以更方便地进行语音识别模型的研究和生产,并推动语音识别生态的发展。让语音识别更有趣!
[**github仓库**](https://github.com/alibaba-damo-academy/FunASR) | [**最新动态**](https://github.com/alibaba-damo-academy/FunASR#whats-new) | [**环境安装**](https://github.com/alibaba-damo-academy/FunASR#installation)| [**服务部署**](https://www.funasr.com)| [**模型库**](https://github.com/alibaba-damo-academy/FunASR/tree/main/model_zoo)| [**联系我们**](https://github.com/alibaba-damo-academy/FunASR#contact)
## 模型原理介绍
SeACoParaformer是阿里巴巴语音实验室提出的新一代热词定制化非自回归语音识别模型。相比于上一代基于CLAS的热词定制化方案,SeACoParaformer解耦了热词模块与ASR模型,通过后验概率融合的方式进行热词激励,使激励过程可见可控,并且热词召回率显著提升。
<p align="center"><img src="fig/seaco.png" alt="SeACoParaformer模型结构" width="380" />
SeACoParaformer的模型结构与训练流程如上图所示,通过引入bias encoder进行热词embedding提取,bias decoder进行注意力建模,SeACoParaformer能够捕捉到Predictor输出和Decoder输出的信息与热词的相关性,并且预测与ASR结果同步的热词输出。通过后验概率的融合,实现热词激励。与ContextualParaformer相比,SeACoParaformer有明显的效果提升,如下图所示:
<p align="center"><img src="fig/res.png" alt="SeACoParaformer模型结构" width="700" />
更详细的细节见:- 论文: [SeACo-Paraformer: A Non-Autoregressive ASR System with Flexible and Effective Hotword Customization Ability](https://arxiv.org/abs/2308.03266)
## 复现论文中的结果```pythonfrom funasr import AutoModel
model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revision="v2.0.4", # vad_model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch", # vad_model_revision="v2.0.4", # punc_model="damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch", # punc_model_revision="v2.0.4", # spk_model="damo/speech_campplus_sv_zh-cn_16k-common", # spk_model_revision="v2.0.2", device="cuda:0" )
res = model.generate(input="YOUR_PATH/aishell1_hotword_dev.scp", hotword='./data/dev/hotword.txt', batch_size_s=300, )fout1 = open("dev.output", 'w')for resi in res: fout1.write("{}\t{}\n".format(resi['key'], resi['text']))
res = model.generate(input="YOUR_PATH/aishell1_hotword_test.scp", hotword='./data/test/hotword.txt', batch_size_s=300, )fout2 = open("test.output", 'w')for resi in res: fout2.write("{}\t{}\n".format(resi['key'], resi['text']))```
## 基于ModelScope进行推理
- 推理支��音频格式如下: - wav文件路径,例如:data/test/audios/asr_example.wav - pcm文件路径,例如:data/test/audios/asr_example.pcm - wav文件url,例如:https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav - wav二进制数据,格式bytes,例如:用户直接从文件里读出bytes数据或者是麦克风录出bytes数据。 - 已解析的audio音频,例如:audio, rate = soundfile.read("asr_example_zh.wav"),类型为numpy.ndarray或者torch.Tensor。 - wav.scp文件,需符合如下要求:
```shcat wav.scpasr_example1 data/test/audios/asr_example1.wavasr_example2 data/test/audios/asr_example2.wav...```
- 若输入格式wav文件url,api调用方式可参考如下范例:
```pythonfrom modelscope.pipelines import pipelinefrom modelscope.utils.constant import Tasks
inference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch', model_revision="v2.0.4")
rec_result = inference_pipeline('https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav', hotword='达摩院 魔搭')print(rec_result)```
- 输入音频为pcm格式,调用api时需要传入音频采样率参数audio_fs,例如:
```pythonrec_result = inference_pipeline('https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.pcm', fs=16000, hotword='达摩院 魔搭')```
- 输入音频为wav格式,api调用方式可参考如下范例:
```pythonrec_result = inference_pipeline('asr_example_zh.wav', hotword='达摩院 魔搭')```
- 若输入格式为文件wav.scp(注:文件名需要以.scp结尾),可添加 output_dir 参数将识别结果写入文件中,api调用方式可参考如下范例:
```pythoninference_pipeline("wav.scp", output_dir='./output_dir', hotword='达摩院 魔搭')```识别结果输出路径结构如下:
```shtree output_dir/output_dir/└── 1best_recog ├── score └── text
1 directory, 3 files```
score:识别路径得分
text:语音识别结果文件
- 若输入音频为已解析的audio音频,api调用方式可参考如下范例:
```pythonimport soundfile
waveform, sample_rate = soundfile.read("asr_example_zh.wav")rec_result = inference_pipeline(waveform, hotword='达摩院 魔搭')```
- ASR、VAD、PUNC模型自由组合
可根据使用需求对VAD和PUNC标点模型进行自由组合,使用方式如下:```pythoninference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch', model_revision="v2.0.4", vad_model='iic/speech_fsmn_vad_zh-cn-16k-common-pytorch', vad_model_revision="v2.0.4", punc_model='iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch', punc_model_revision="v2.0.3", # spk_model="iic/speech_campplus_sv_zh-cn_16k-common", # spk_model_revision="v2.0.2",)```若不使用PUNC模型,可配置punc_model=None,或不传入punc_model参数,如需加入LM模型,可增加配置lm_model='iic/speech_transformer_lm_zh-cn-common-vocab8404-pytorch',并设置lm_weight和beam_size参数。
## 基于FunASR进行推理
下面为快速上手教程,测试音频([中文](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example.wav),[英文](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_en.wav))
### 可执行命令行在命令行终端执行:
```shellfunasr +model=paraformer-zh +vad_model="fsmn-vad" +punc_model="ct-punc" +input=vad_example.wav```
注:支持单条音频文件识别,也支持文件列表,列表为kaldi风格wav.scp:`wav_id wav_path`
### python示例#### 非实时语音识别```pythonfrom funasr import AutoModel# paraformer-zh is a multi-functional asr model# use vad, punc, spk or not as you needmodel = AutoModel(model="paraformer-zh", model_revision="v2.0.4", vad_model="fsmn-vad", vad_model_revision="v2.0.4", punc_model="ct-punc-c", punc_model_revision="v2.0.4", # spk_model="cam++", spk_model_revision="v2.0.2", )res = model.generate(input=f"{model.model_path}/example/asr_example.wav", batch_size_s=300, hotword='魔搭')print(res)```注:`model_hub`:表示模型仓库,`ms`为选择modelscope下载,`hf`为选择huggingface下载。
#### 实时语音识别
```pythonfrom funasr import AutoModel
chunk_size = [0, 10, 5] #[0, 10, 5] 600ms, [0, 8, 4] 480msencoder_chunk_look_back = 4 #number of chunks to lookback for encoder self-attentiondecoder_chunk_look_back = 1 #number of encoder chunks to lookback for decoder cross-attention
model = AutoModel(model="paraformer-zh-streaming", model_revision="v2.0.4")
import soundfileimport os
wav_file = os.path.join(model.model_path, "example/asr_example.wav")speech, sample_rate = soundfile.read(wav_file)chunk_stride = chunk_size[1] * 960 # 600ms
cache = {}total_chunk_num = int(len((speech)-1)/chunk_stride+1)for i in range(total_chunk_num): speech_chunk = speech[i*chunk_stride:(i+1)*chunk_stride] is_final = i == total_chunk_num - 1 res = model.generate(input=speech_chunk, cache=cache, is_final=is_final, chunk_size=chunk_size, encoder_chunk_look_back=encoder_chunk_look_back, decoder_chunk_look_back=decoder_chunk_look_back) print(res)```
注:`chunk_size`为流式延时配置,`[0,10,5]`表示上屏实时出字粒度为`10*60=600ms`,未来信息为`5*60=300ms`。每次推理输入为`600ms`(采样点数为`16000*0.6=960`),输出为对应文字,最后一个语音片段输入需要设置`is_final=True`来强制输出最后一个字。
#### 语音端点检测(非实时)```pythonfrom funasr import AutoModel
model = AutoModel(model="fsmn-vad", model_revision="v2.0.4")
wav_file = f"{model.model_path}/example/asr_example.wav"res = model.generate(input=wav_file)print(res)```
#### 语音端点检测(实时)```pythonfrom funasr import AutoModel
chunk_size = 200 # msmodel = AutoModel(model="fsmn-vad", model_revision="v2.0.4")
import soundfile
wav_file = f"{model.model_path}/example/vad_example.wav"speech, sample_rate = soundfile.read(wav_file)chunk_stride = int(chunk_size * sample_rate / 1000)
cache = {}total_chunk_num = int(len((speech)-1)/chunk_stride+1)for i in range(total_chunk_num): speech_chunk = speech[i*chunk_stride:(i+1)*chunk_stride] is_final = i == total_chunk_num - 1 res = model.generate(input=speech_chunk, cache=cache, is_final=is_final, chunk_size=chunk_size) if len(res[0]["value"]): print(res)```
#### 标点恢复```pythonfrom funasr import AutoModel
model = AutoModel(model="ct-punc", model_revision="v2.0.4")
res = model.generate(input="那今天的会就到这里吧 happy new year 明年见")print(res)```
#### 时间戳预测```pythonfrom funasr import AutoModel
model = AutoModel(model="fa-zh", model_revision="v2.0.4")
wav_file = f"{model.model_path}/example/asr_example.wav"text_file = f"{model.model_path}/example/text.txt"res = model.generate(input=(wav_file, text_file), data_type=("sound", "text"))print(res)```
更多详细用法([示例](https://github.com/alibaba-damo-academy/FunASR/tree/main/examples/industrial_data_pretraining))
## 微调
详细用法([示例](https://github.com/alibaba-damo-academy/FunASR/tree/main/examples/industrial_data_pretraining))
## 相关论文以及引用信息
```BibTeX@article{shi2023seaco, title={SeACo-Paraformer: A Non-Autoregressive ASR System with Flexible and Effective Hotword Customization Ability}, author={Shi, Xian and Yang, Yexin and Li, Zerui and Zhang, Shiliang}, journal={arXiv preprint arXiv:2308.03266 (accepted by ICASSP2024)}, year={2023}}```12345678<Nnet> <Splice> 560 560[ 0 ]<AddShift> 560 560 <LearnRateCoef> 0 [ -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 -8.311879 -8.600912 -9.615928 -10.43595 -11.21292 -11.88333 -12.36243 -12.63706 -12.8818 -12.83066 -12.89103 -12.95666 -13.19763 -13.40598 -13.49113 -13.5546 -13.55639 -13.51915 -13.68284 -13.53289 -13.42107 -13.65519 -13.50713 -13.75251 -13.76715 -13.87408 -13.73109 -13.70412 -13.56073 -13.53488 -13.54895 -13.56228 -13.59408 -13.62047 -13.64198 -13.66109 -13.62669 -13.58297 -13.57387 -13.4739 -13.53063 -13.48348 -13.61047 -13.64716 -13.71546 -13.79184 -13.90614 -14.03098 -14.18205 -14.35881 -14.48419 -14.60172 -14.70591 -14.83362 -14.92122 -15.00622 -15.05122 -15.03119 -14.99028 -14.92302 -14.86927 -14.82691 -14.7972 -14.76909 -14.71356 -14.61277 -14.51696 -14.42252 -14.36405 -14.30451 -14.23161 -14.19851 -14.16633 -14.15649 -14.10504 -13.99518 -13.79562 -13.3996 -12.7767 -11.71208 ]<Rescale> 560 560<LearnRateCoef> 0 [ 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 0.155775 0.154484 0.1527379 0.1518718 0.1506028 0.1489256 0.147067 0.1447061 0.1436307 0.1443568 0.1451849 0.1455157 0.1452821 0.1445717 0.1439195 0.1435867 0.1436018 0.1438781 0.1442086 0.1448844 0.1454756 0.145663 0.146268 0.1467386 0.1472724 0.147664 0.1480913 0.1483739 0.1488841 0.1493636 0.1497088 0.1500379 0.1502916 0.1505389 0.1506787 0.1507102 0.1505992 0.1505445 0.1505938 0.1508133 0.1509569 0.1512396 0.1514625 0.1516195 0.1516156 0.1515561 0.1514966 0.1513976 0.1512612 0.151076 0.1510596 0.1510431 0.151077 0.1511168 0.1511917 0.151023 0.1508045 0.1505885 0.1503493 0.1502373 0.1501726 0.1500762 0.1500065 0.1499782 0.150057 0.1502658 0.150469 0.1505335 0.1505505 0.1505328 0.1504275 0.1502438 0.1499674 0.1497118 0.1494661 0.1493102 0.1493681 0.1495501 0.1499738 0.1509654 ]</Nnet> 123version https://git-lfs.github.com/spec/v1oid sha256:51792bc95be33075c1a8abb9afb76ad9f72943e84cd723cc8825b2678799b004size 253642123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160# This is an example that demonstrates how to configure a model file.# You can modify the configuration according to your own requirements.
# to print the register_table:# from funasr.utils.register import registry_tables# registry_tables.print()
# network architecturemodel: SeacoParaformermodel_conf: ctc_weight: 0.0 lsm_weight: 0.1 length_normalized_loss: true predictor_weight: 1.0 predictor_bias: 1 sampling_ratio: 0.75 inner_dim: 512 bias_encoder_type: lstm bias_encoder_bid: false seaco_lsm_weight: 0.1 seaco_length_normal: true train_decoder: true NO_BIAS: 8377
# encoderencoder: SANMEncoderencoder_conf: output_size: 512 attention_heads: 4 linear_units: 2048 num_blocks: 50 dropout_rate: 0.1 positional_dropout_rate: 0.1 attention_dropout_rate: 0.1 input_layer: pe pos_enc_class: SinusoidalPositionEncoder normalize_before: true kernel_size: 11 sanm_shfit: 0 selfattention_layer_type: sanm
# decoderdecoder: ParaformerSANMDecoderdecoder_conf: attention_heads: 4 linear_units: 2048 num_blocks: 16 dropout_rate: 0.1 positional_dropout_rate: 0.1 self_attention_dropout_rate: 0.1 src_attention_dropout_rate: 0.1 att_layer_num: 16 kernel_size: 11 sanm_shfit: 0
# seaco decoderseaco_decoder: ParaformerSANMDecoderseaco_decoder_conf: attention_heads: 4 linear_units: 1024 num_blocks: 4 dropout_rate: 0.1 positional_dropout_rate: 0.1 self_attention_dropout_rate: 0.1 src_attention_dropout_rate: 0.1 kernel_size: 21 sanm_shfit: 0 use_output_layer: false wo_input_layer: true
predictor: CifPredictorV3predictor_conf: idim: 512 threshold: 1.0 l_order: 1 r_order: 1 tail_threshold: 0.45 smooth_factor2: 0.25 noise_threshold2: 0.01 upsample_times: 3 use_cif1_cnn: false upsample_type: cnn_blstm
# frontend relatedfrontend: WavFrontendfrontend_conf: fs: 16000 window: hamming n_mels: 80 frame_length: 25 frame_shift: 10 lfr_m: 7 lfr_n: 6 dither: 0.0
specaug: SpecAugLFRspecaug_conf: apply_time_warp: false time_warp_window: 5 time_warp_mode: bicubic apply_freq_mask: true freq_mask_width_range: - 0 - 30 lfr_rate: 6 num_freq_mask: 1 apply_time_mask: true time_mask_width_range: - 0 - 12 num_time_mask: 1
train_conf: accum_grad: 1 grad_clip: 5 max_epoch: 150 val_scheduler_criterion: - valid - acc best_model_criterion: - - valid - acc - max keep_nbest_models: 10 log_interval: 50 unused_parameters: true
optim: adamoptim_conf: lr: 0.0005scheduler: warmuplrscheduler_conf: warmup_steps: 30000
dataset: AudioDatasetHotworddataset_conf: seaco_id: 8377 index_ds: IndexDSJsonl batch_sampler: DynamicBatchLocalShuffleSampler batch_type: example # example or length batch_size: 1 # if batch_type is example, batch_size is the numbers of samples; if length, batch_size is source_token_len+target_token_len; max_token_length: 2048 # filter samples if source_token_len+target_token_len > max_token_length, buffer_size: 500 shuffle: True num_workers: 0
tokenizer: CharTokenizertokenizer_conf: unk_symbol: <unk> split_with_space: true
ctc_conf: dropout_rate: 0.0 ctc_type: builtin reduce: true ignore_nan_grad: true normalize: null
1234567891011121314{ "framework": "pytorch", "task" : "auto-speech-recognition", "model": {"type" : "funasr"}, "pipeline": {"type":"funasr-pipeline"}, "model_name_in_hub": { "ms":"iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", "hf":""}, "file_path_metas": { "init_param":"model.pt", "config":"config.yaml", "tokenizer_conf": {"token_list": "tokens.json", "seg_dict_file": "seg_dict"}, "frontend_conf":{"cmvn_file": "am.mvn"}}}123version https://git-lfs.github.com/spec/v1oid sha256:2ffa478de2cd570dd54e8762008cd6bbde9871fd79757f1cdbbec7d6b7b49274size 1447701魔搭123version https://git-lfs.github.com/spec/v1oid sha256:3d491689244ec5dfbf9170ef3827c358aa10f1f20e42a7c59e15e688647946d1size 989763045.gitattributes+5
preprocessors/.gitattributesAdded+40
preprocessors/README.mdAdded+3
preprocessors/dereverb_mel_band_roformer/dereverb_mel_band_roformer_anvuew.yamlAdded+76
preprocessors/dereverb_mel_band_roformer/dereverb_mel_band_roformer_anvuew_sdr_19.1729.ckptAdded+3
preprocessors/mel-band-roformer-karaoke/config_karaoke_becruily.yamlAdded+72
preprocessors/mel-band-roformer-karaoke/mel_band_roformer_karaoke_becruily.ckptAdded+3
preprocessors/parakeet-tdt-0.6b-v2/parakeet-tdt-0.6b-v2.nemoAdded+3
preprocessors/rmvpe/rmvpe.ptAdded+3
preprocessors/rosvot/rmvpe/model.ptAdded+3
preprocessors/rosvot/rosvot/config.yamlAdded+159
preprocessors/rosvot/rosvot/model.ptAdded+3
preprocessors/rosvot/rwbd/config.yamlAdded+171
preprocessors/rosvot/rwbd/model.ptAdded+3
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/README.mdAdded+357
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvnAdded+8
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/asr_example_hotword.wavAdded+3
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/config.yamlAdded+160
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/configuration.jsonAdded+14
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/asr_example.wavAdded+3
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/hotword.txtAdded+1
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/res.pngAdded

Large File Pointer Details
- SHA256: 1f59ebc6a86733896b2b84110e2aae5625754382762bf1324e017d89a152c2fb
- Pointer size: 131 Bytes
- Size of remote file: 197 kB
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/fig/seaco.pngAdded

Large File Pointer Details
- SHA256: 6886864eb6bcc6487a17111b5e3353bd72e7c78fda98c27cf47faa35eafbdcaf
- Pointer size: 131 Bytes
- Size of remote file: 171 kB
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.ptAdded+3
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/seg_dictAdded
preprocessors/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/tokens.jsonAdded