Error during running Russian_TTS_with_IPA_G2P_FastPitch_and_HifiGAN.ipynb

#2
by kzipa - opened

Hello! I'm trying to reproduce your results, and getting the error while executing nemo/examples/nlp/text_normalization_as_tagging/normalization_as_tagging_infer.py from your notebook Russian_TTS_with_IPA_G2P_FastPitch_and_HifiGAN.ipynb

[NeMo W 2024-11-07 12:51:27 nemo_logging:361] /usr/local/lib/python3.10/dist-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)

[NeMo W 2024-11-07 12:51:27 nemo_logging:361] /usr/local/lib/python3.10/dist-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
See https://hydra.cc/docs/1.2/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
ret = run_job(

GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
HPU available: False, using: 0 HPUs
Trainer(val_check_interval=1.0) was configured so validation will run at the end of the training epoch..
[NeMo I 2024-11-07 12:51:27 helpers:63] Loading pretrained model ru_g2p_ipa_bert_large/ru_g2p.nemo
Error executing job with overrides: ['pretrained_model=ru_g2p_ipa_bert_large/ru_g2p.nemo', 'inference.from_file=input_for_g2p.txt', 'inference.out_file=output_of_g2p.txt', 'model.max_sequence_len=512', 'inference.batch_size=128', 'lang=ru']
Traceback (most recent call last):
File "/nemo_compatible/notebooks/nemo/examples/nlp/text_normalization_as_tagging/normalization_as_tagging_infer.py", line 91, in
main()
File "/usr/local/lib/python3.10/dist-packages/nemo/core/config/hydra_runner.py", line 129, in wrapper
_run_hydra(
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/usr/local/lib/python3.10/dist-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/usr/local/lib/python3.10/dist-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/usr/local/lib/python3.10/dist-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/nemo_compatible/notebooks/nemo/examples/nlp/text_normalization_as_tagging/normalization_as_tagging_infer.py", line 56, in main
_, model = instantiate_model_and_trainer(cfg, ITN_MODEL, False)
File "/nemo_compatible/notebooks/nemo/examples/nlp/text_normalization_as_tagging/helpers.py", line 66, in instantiate_model_and_trainer
raise (
ValueError: ru_g2p_ipa_bert_large/ru_g2p.nemo not in the list of available Tagger models.Select from [PretrainedModelInfo(
pretrained_model_name=itn_en_thutmose_bert,
description=A single-pass tagger-based English model for inverse text normalization basedon BERT, trained on 2 mln sentences from Google Text Normalization Dataset,
location=https://api.ngc.nvidia.com/v2/models/nvidia/nemo/itn_en_thutmose_bert/versions/1.9.0/files/itn_en_thutmose_bert.nemo
), PretrainedModelInfo(
pretrained_model_name=itn_ru_thutmose_bert,
description=A single-pass tagger-based Russian model for inverse text normalization basedon BERT, trained on 2 mln sentences from Google Text Normalization Dataset,
location=https://api.ngc.nvidia.com/v2/models/nvidia/nemo/itn_ru_thutmose_bert/versions/1.11.0/files/itn_ru_thutmose_bert.nemo
)]

Please, can you help? What version of nemo is compatible with your solution?

Hi,
the error you get means it was not not able to find the downloaded model in the current directory
Namely, this check failed.

Can you check, that you have a folder ru_g2p_ipa_bert_large and inside it the model file ru_g2p.nemo

@kzipa
I think it was tested with versions like r1.21.0-r1.23.0
If you see import error check this issue

Ok! Thank you, I solved this!

kzipa changed discussion status to closed

Sign up or log in to comment