Text-to-Speech
NeMo
GGUF
NeMo
TTS
PyTorch
Speech
Multilingual-TTS

docs(readme): add NIM Try via API (Magpie TTS Multilingual)

#5
Files changed (1) hide show
  1. README.md +74 -0
README.md CHANGED
@@ -286,6 +286,80 @@ When `--run_evaluation` is enabled, the following metrics are computed:
286
  | **RTF** | Real-time factor (processing time / audio duration) |
287
 
288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  ## Software Integration:
290
  **Runtime Engine(s):** NeMo Framework 25.11
291
 
 
286
  | **RTF** | Real-time factor (processing time / audio duration) |
287
 
288
 
289
+ ## Try via API — No Setup Required
290
+
291
+ Synthesize speech using the hosted NVIDIA NIM API on [Magpie TTS Multilingual](https://build.nvidia.com/nvidia/magpie-tts-multilingual) — no local GPU, Docker, or checkpoint download required.
292
+
293
+ **1. Get a free API key:** Open [Magpie TTS Multilingual](https://build.nvidia.com/nvidia/magpie-tts-multilingual) and choose **Get API Key**.
294
+
295
+ **2. Install the Riva client:**
296
+
297
+ ```bash
298
+ pip install nvidia-riva-client
299
+ ```
300
+
301
+ **3. Synthesize speech to a WAV file:**
302
+
303
+ ```python
304
+ import wave
305
+
306
+ import riva.client
307
+ from riva.client.proto.riva_audio_pb2 import AudioEncoding
308
+
309
+ auth = riva.client.Auth(
310
+ uri="grpc.nvcf.nvidia.com:443",
311
+ use_ssl=True,
312
+ metadata_args=[
313
+ ["function-id", "877104f7-e885-42b9-8de8-f6e4c6303969"],
314
+ ["authorization", "Bearer nvapi-YOUR_API_KEY"],
315
+ ],
316
+ )
317
+
318
+ service = riva.client.SpeechSynthesisService(auth)
319
+
320
+ sample_rate_hz = 22050
321
+ resp = service.synthesize(
322
+ "Hello from the Magpie multilingual hosted API.",
323
+ "Magpie-Multilingual.EN-US.Sofia",
324
+ "en-US",
325
+ sample_rate_hz=sample_rate_hz,
326
+ encoding=AudioEncoding.LINEAR_PCM,
327
+ )
328
+
329
+ with wave.open("out.wav", "wb") as wf:
330
+ wf.setnchannels(1)
331
+ wf.setsampwidth(2)
332
+ wf.setframerate(sample_rate_hz)
333
+ wf.writeframesraw(resp.audio)
334
+ ```
335
+
336
+ **Or use the CLI (list voices, then synthesize):**
337
+
338
+ ```bash
339
+ git clone https://github.com/nvidia-riva/python-clients.git
340
+ export NVIDIA_API_KEY="nvapi-YOUR_API_KEY"
341
+
342
+ python python-clients/scripts/tts/talk.py \
343
+ --server grpc.nvcf.nvidia.com:443 --use-ssl \
344
+ --metadata function-id "877104f7-e885-42b9-8de8-f6e4c6303969" \
345
+ --metadata authorization "Bearer $NVIDIA_API_KEY" \
346
+ --list-voices
347
+
348
+ python python-clients/scripts/tts/talk.py \
349
+ --server grpc.nvcf.nvidia.com:443 --use-ssl \
350
+ --metadata function-id "877104f7-e885-42b9-8de8-f6e4c6303969" \
351
+ --metadata authorization "Bearer $NVIDIA_API_KEY" \
352
+ --text "Hello from Magpie." \
353
+ --voice "Magpie-Multilingual.EN-US.Sofia" \
354
+ --language-code en-US \
355
+ --sample-rate-hz 22050 \
356
+ -o out.wav
357
+ ```
358
+
359
+ > **Note:** Voice IDs and supported sample rates follow the deployed NIM. Use `--list-voices` against this endpoint, or see the **API Reference** on the [Magpie TTS Multilingual](https://build.nvidia.com/nvidia/magpie-tts-multilingual) page.
360
+
361
+
362
+
363
  ## Software Integration:
364
  **Runtime Engine(s):** NeMo Framework 25.11
365