Error using riva build (KeyError: 'g2p')

Hardware - GPU: RTX3070 Notebook
Hardware - CPU: Intel i7 12700H
Operating System: Ubuntu 20.04
Riva Version: 2.7.0

I’m trying to use a multi-speak pre-trained Spanish model from NeMo on Riva.

I launch an interactive session inside the Riva ServiceMaker image, with these lines:

docker run --gpus all -it --rm
-v /home/nigel/Downloads/files/modelos_riva:/servicemaker-dev
-v /home/nigel/Downloads/files/modelos_riva/repo_riva:/data

When executing the following lines inside the Riva ServiceMaker docker:

riva-build speech_synthesis

It returns the following error:

Traceback (most recent call last):
File “/usr/local/bin/riva-build”, line 8, in
File “/usr/local/lib/python3.8/dist-packages/servicemaker/cli/”, line 97, in build
File “/usr/local/lib/python3.8/dist-packages/servicemaker/pipelines/”, line 228, in init_from
tt_config = src_config[‘text_tokenizer’][‘g2p’]
KeyError: ‘g2p’

How can I solve that?

Hi @nharo

Thanks for your interest in Riva

Apologies it is showing error,

Let us try to reproduce the issue from our end

Could you please share with us the NGC link from which you downloaded the spanish model


Hello, I downloaded it from here:

Hi @nharo

Apologies for the delay

There were some issue with the nemo2riva conversion with earlier version, can you try the nemo2riva conversion using the below suggested method and let us know if it helps solve your issue

Build the Docker

git clone -b r1.15.0 
cd  NeMo
DOCKER_BUILDKIT=1 nvidia-docker build . -t nemo15

Start the Container (Before starting make sure to add the nemo model and nemo2riva-2.8.1-py3-none-any.whl wheel file from quickstart into the volume i.e <nemo_github_folder> of below command )

docker run --gpus all -it --rm -v <nemo_github_folder>:/NeMo --shm-size=8g \
-p 8888:8888 -p 6006:6006 --ulimit memlock=-1 --ulimit \
stack=67108864 --device=/dev/snd nemo15

Then do the conversion

pip install nemo2riva-2.8.1-py3-none-any.whl

nemo2riva --key tlt_encode --out /NeMo/tts_es_fastpitch_multispeaker.riva /NeMo/tts_es_fastpitch_multispeaker.nemo

And let us know using this riva model does cause trouble with riva-deploy and riva-build command,