dlxj commited on
Commit ·
87842ef
1
Parent(s): f5d2dd3
CTC 训练推理正常,for nemo==2.8.0.rc0,但是推理时第一个字符被吃了,其他都正常
Browse filesFiles changed (7)
114 unmodified lines115116117118119120121114 unmodified linesfrom nemo.collections.asr.parts.utils.manifest_utils import read_manifestfrom nemo.collections.asr.parts.utils.rnnt_utils import Hypothesisfrom nemo.collections.asr.parts.utils.streaming_utils import CacheAwareStreamingAudioBufferfrom nemo.collections.asr.parts.utils.transcribe_utils import setup_model, normalize_timestamp_output, process_timestamp_outputsfrom nemo.core.config import hydra_runnerfrom nemo.utils import logging114 unmodified lines115116117118119120121122114 unmodified linesfrom nemo.collections.asr.parts.utils.manifest_utils import read_manifestfrom nemo.collections.asr.parts.utils.rnnt_utils import Hypothesisfrom nemo.collections.asr.parts.utils.streaming_utils import CacheAwareStreamingAudioBufferfrom nemo.collections.asr.parts.utils.transcribe_utils import setup_model, normalize_timestamp_outputfrom nemo.collections.asr.parts.utils.timestamp_utils import process_timestamp_outputsfrom nemo.core.config import hydra_runnerfrom nemo.utils import logging
93 unmodified lines9495969798991008 unmodified lines1091101111121131141153 unmodified lines11912012112212312412593 unmodified linesif hasattr(cfg.model, 'test_ds') and cfg.model.test_ds.manifest_filepath is not None:if asr_model.prepare_test(trainer):trainer.test(asr_model)if __name__ == '__main__':8 unmodified lines'exp_manager.resume_ignore_no_checkpoint=true','exp_manager.exp_dir=results/','exp_manager.checkpoint_callback_params.save_top_k=1','++trainer.check_val_every_n_epoch=350','++model.encoder.conv_norm_type=layer_norm','model.tokenizer.dir=data/common_voice_11_0/ja/tokenizers/tokenizer_spe_bpe_v2491','model.train_ds.tarred_audio_filepaths=data/common_voice_11_0/ja/train_tarred_1bk/audio__OP_0..1023_CL_.tar',3 unmodified lines'model.train_ds.manifest_filepath=data/common_voice_11_0/ja/train_tarred_1bk/tarred_audio_manifest.json','model.validation_ds.manifest_filepath=data/common_voice_11_0/ja/validation/validation_common_voice_11_0_manifest.json','model.test_ds.manifest_filepath=data/common_voice_11_0/ja/test/test_common_voice_11_0_manifest.json','trainer.max_epochs=350','trainer.devices=1','trainer.accelerator=gpu','trainer.strategy=auto',93 unmodified lines9495969798991001011021038 unmodified lines1121131141151161171183 unmodified lines12212312412512612712893 unmodified linesif hasattr(cfg.model, 'test_ds') and cfg.model.test_ds.manifest_filepath is not None:if asr_model.prepare_test(trainer):if trainer.checkpoint_callback and trainer.checkpoint_callback.best_model_path:trainer.test(asr_model, ckpt_path='best')else:trainer.test(asr_model)if __name__ == '__main__':8 unmodified lines'exp_manager.resume_ignore_no_checkpoint=true','exp_manager.exp_dir=results/','exp_manager.checkpoint_callback_params.save_top_k=1','++trainer.check_val_every_n_epoch=700','++model.encoder.conv_norm_type=layer_norm','model.tokenizer.dir=data/common_voice_11_0/ja/tokenizers/tokenizer_spe_bpe_v2491','model.train_ds.tarred_audio_filepaths=data/common_voice_11_0/ja/train_tarred_1bk/audio__OP_0..1023_CL_.tar',3 unmodified lines'model.train_ds.manifest_filepath=data/common_voice_11_0/ja/train_tarred_1bk/tarred_audio_manifest.json','model.validation_ds.manifest_filepath=data/common_voice_11_0/ja/validation/validation_common_voice_11_0_manifest.json','model.test_ds.manifest_filepath=data/common_voice_11_0/ja/test/test_common_voice_11_0_manifest.json','trainer.max_epochs=700','trainer.devices=1','trainer.accelerator=gpu','trainer.strategy=auto',
935 unmodified lines936937938939940941942935 unmodified linesself.current_bytes, self.current_fn = next(self.iterator)self.offset_id = 0else:offset_list = self.collection.mapping[self.current_fn]if len(offset_list) == self.offset_id + 1:self.current_bytes, self.current_fn = next(self.iterator)self.offset_id = 0935 unmodified lines936937938939940941942943935 unmodified linesself.current_bytes, self.current_fn = next(self.iterator)self.offset_id = 0else:file_id, _ = os.path.splitext(os.path.basename(self.current_fn))offset_list = self.collection.mapping[file_id]if len(offset_list) == self.offset_id + 1:self.current_bytes, self.current_fn = next(self.iterator)self.offset_id = 0
14 unmodified lines15161718192014 unmodified linesCTC 能正常训练的 nemo 版本是 2.2.1这个 KeyError 报错是由于 WebDataset 解析 tar 包中的路径与 NeMo 的 Manifest 映射字典键值不匹配 导致的。14 unmodified lines15161718192021222314 unmodified linesCTC 能正常训练的 nemo 版本是 2.2.1common_voice_11_0 需要的版本是 datasets==3.6.0numpy==1.26.4这个 KeyError 报错是由于 WebDataset 解析 tar 包中的路径与 NeMo 的 Manifest 映射字典键值不匹配 导致的。
11 unmodified lines12131411 unmodified linestorch==2.11.0nemo-toolkit[asr,cu13]lhotse11 unmodified lines121314151617181911 unmodified linestorch==2.11.0nemo-toolkit[asr,cu13]lhotsenv_one_logger_core>=2.3.1nv_one_logger_training_telemetry>=2.3.1nv_one_logger_pytorch_lightning_integration>=2.3.1kaldi-python-iokaldialign
12 unmodified lines1314151617181912 unmodified linesfrom aiohttp import web, WSMsgTypefrom loguru import loggerfrom nemo.collections.asr.parts.utils.transcribe_utils import normalize_timestamp_output, process_timestamp_outputs# Enable debug logging with DEBUG_ASR=1DEBUG_ASR = os.environ.get("DEBUG_ASR", "0") == "1"12 unmodified lines131415161718192012 unmodified linesfrom aiohttp import web, WSMsgTypefrom loguru import loggerfrom nemo.collections.asr.parts.utils.transcribe_utils import normalize_timestamp_outputfrom nemo.collections.asr.parts.utils.timestamp_utils import process_timestamp_outputs# Enable debug logging with DEBUG_ASR=1DEBUG_ASR = os.environ.get("DEBUG_ASR", "0") == "1"
165 unmodified lines1661671681691701711721 unmodified line174175176177178179180165 unmodified linesimport sys# sys.argv.append( '--all' )audio_path = "./harvard_16k.wav" # "./common_voice_ja_25372057.wav" # "./harvard_16k.wav"server_url = "ws://127.0.0.1:8080"1 unmodified lineif "--all" in sys.argv:asyncio.run(test_multiple_chunk_sizes(audio_path, server_url))else:chunk_ms = 500if "--chunk" in sys.argv:idx = sys.argv.index("--chunk")if idx + 1 < len(sys.argv):165 unmodified lines1661671681691701711721 unmodified line174175176177178179180165 unmodified linesimport sys# sys.argv.append( '--all' )audio_path = "./common_voice_ja_25372057.wav" # "./common_voice_ja_25372057.wav" # "./harvard_16k.wav"server_url = "ws://127.0.0.1:8080"1 unmodified lineif "--all" in sys.argv:asyncio.run(test_multiple_chunk_sizes(audio_path, server_url))else:chunk_ms = 700if "--chunk" in sys.argv:idx = sys.argv.index("--chunk")if idx + 1 < len(sys.argv):
examples/asr/asr_cache_aware_streaming/speech_to_text_cache_aware_streaming_infer.py+2-1
examples/asr/asr_ctc/speech_to_text_ctc_bpe.py+6-3
nemo/collections/asr/data/audio_to_text.py+2-1
readme.txt+3
requirements.txt+5
server_aware_streaming.py+2-1
test_websocket_client.py+2-2