Skip to main content
NVIDIA
NVIDIA

fastpitch-hifigan-tts

DeprecatedDownloadable

Expressive and engaging English voices for Q&A assistants, brand ambassadors, and service robots

API Reference
Deploying your application in production? Get started with a 90-day evaluation of NVIDIA AI Enterprise

Follow the steps below to download and run the NVIDIA NIM inference microservice for this model on your infrastructure of choice.

Generate API Key

Pull and Run the NIM

Bash
$ docker login nvcr.io
Username: $oauthtoken
Password: <PASTE_API_KEY_HERE>

Refer to Supported Models for full list of models.

Bash
export NGC_API_KEY=<PASTE_API_KEY_HERE>

export CONTAINER_NAME=fastpitch-hifigan-tts
docker run -it --rm --name=$CONTAINER_NAME \
  --runtime=nvidia \
  --gpus '"device=0"' \
  --shm-size=8GB \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=9000 \
  -e NIM_GRPC_API_PORT=50051 \
  -p 9000:9000 \
  -p 50051:50051 \
  -e NIM_TAGS_SELECTOR=name=fastpitch-hifigan-en-us \
  nvcr.io/nim/nvidia/riva-tts:1.3.0
{note}
It may take a up to 30 minutes depending on your network speed, for the container to be ready and start accepting requests from the time the docker container is started.

Test the NIM

Open a new terminal and run following command to check if the service is ready to handle inference requests

Bash
curl -X 'GET' 'http://localhost:9000/v1/health/ready'

If the service is ready, you get a response similar to the following.

Bash
{"ready":true}

Install the Riva Python client package

Bash
sudo apt-get install python3-pip
pip install nvidia-riva-client

Download Riva sample clients

Bash
git clone https://github.com/nvidia-riva/python-clients.git

Run Text to Speech inference

Bash
python3 python-clients/scripts/tts/talk.py --server 0.0.0.0:50051 --text "Hello, this is a speech synthesizer." --language-code en-US --output output.wav

On running the above command, the synthesized audio file named output.wav will be created.

For more details on getting started with this NIM, visit the NVIDIA NIM Docs.