
Natural and expressive voices in multiple languages. For voice agents and brand ambassadors.
Riva supports gRPC and HTTP APIs.
List available voices:
curl -s https://877104f7-e885-42b9-8de8-f6e4c6303969.invocation.api.nvcf.nvidia.com/v1/audio/list_voices \
-H "Authorization: Bearer $NVIDIA_API_KEY"
Synthesize speech. Replace text, language, and voice values as needed.
curl -s -X POST https://877104f7-e885-42b9-8de8-f6e4c6303969.invocation.api.nvcf.nvidia.com/v1/audio/synthesize \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-F "text=this audio is generated from nvidias text to speech model" \
-F "language=en-US" \
-F "voice=Magpie-Multilingual.EN-US.Aria" \
-F "encoding=LINEAR_PCM" \
-F "sample_rate_hz=44100" \
--output audio.wav
Instructions below demonstrate usage of magpie-tts-multilingual model using Python gRPC client. For full API details refer gRPC API Reference.
You will need a system with Git and Python 3+ installed.
pip install -U nvidia-riva-client
Download Python client code by cloning Python Client Repository.
git clone https://github.com/nvidia-riva/python-clients.git
Open a command terminal and execute below command to synthesize audio from the example text. If you have generated the API key, it will be auto-populated in the command.
python python-clients/scripts/tts/talk.py \
--server grpc.nvcf.nvidia.com:443 --use-ssl \
--metadata function-id "877104f7-e885-42b9-8de8-f6e4c6303969" \
--metadata authorization "Bearer $NVIDIA_API_KEY" \
--language-code en-US \
--text "this audio is generated from nvidia's text to speech model" \
--voice "Magpie-Multilingual.EN-US.Aria" \
--output audio.wav
List of available voices can be obtained using below command.
python python-clients/scripts/tts/talk.py \
--server grpc.nvcf.nvidia.com:443 --use-ssl \
--metadata function-id "877104f7-e885-42b9-8de8-f6e4c6303969" \
--metadata authorization "Bearer $NVIDIA_API_KEY" \
--list-voices
Riva uses gRPC APIs. Proto files can be downloaded from Riva gRPC Proto files and compiled to target language using Protoc compiler. Example Riva clients in C++ and Python languages are provided below.