
magpie-tts-multilingual
DownloadableNatural and expressive voices in multiple languages. For voice agents and brand ambassadors.
Nemotron Speech supports gRPC and HTTP APIs.
Inference using HTTP API
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
Inference using gRPC API
Instructions below demonstrate usage of magpie-tts-multilingual model using Python gRPC client. For full API details refer gRPC API Reference.
Prerequisites
You will need a system with Git and Python 3+ installed.
Install Nemotron Speech Python Client
pip install -U nvidia-riva-client
Download Python Client
Download Python client code by cloning Python Client Repository.
git clone https://github.com/nvidia-riva/python-clients.git
Run Python Client
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
Support for gRPC clients in other languages
Nemotron Speech uses gRPC APIs. Proto files can be downloaded from Nemotron Speech gRPC Proto files and compiled to target language using Protoc compiler. Example Nemotron Speech clients in C++ and Python languages are provided below.