> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m-star.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Nemotron VoiceChat

> Test a recorded turn and keep a full-duplex conversation running.

Nemotron VoiceChat listens and speaks simultaneously. Audio input advances the model’s clock, including while it replies. Use a user-only clip ending in a few seconds of silence for the first check.

## Install and start

The one-GPU default loads `nvidia/NVIDIA-NemotronLabs-VoiceChat-11B` and a tokenizer from the `nano/` directory of `pipecat-ai/NVIDIA-NemotronLabs-VoiceChat-11B-Spark`. Cache both for an offline deployment.

### `nemotron_duplex`

Audio → text, audio. The default `nemotron_duplex.yaml` uses 1 GPU. Beta. The [weights](https://huggingface.co/nvidia/NVIDIA-NemotronLabs-VoiceChat-11B) use OpenMDW-1.1.

```bash theme={null}
uv pip install --torch-backend=auto "mstar-ai[all]"
mstar serve nemotron_duplex
```

[Send the request](#recorded-turn).

## Send a request

Run either client example in a second terminal after `/health` returns 200.

### Listen to a recorded turn

Record mono speech at 16 kHz in `user.wav` with several seconds of silence after the speaker finishes. The model generates its reply during that silence in its fixed Aria voice. For a stereo demo recording, extract the user channel first. To set the opening system prompt, pass `text` in the native request. For a live call, set session `instructions` on [OpenAI Realtime](https://docs.m-star.org/clients.md#realtime-conversation).

**Python SDK**

```python theme={null}
from mstar import MStarClient

client = MStarClient("http://localhost:8000")
reply = client.generate(
    audio='user.wav',
    input_modalities=('audio',),
    output_modalities=('text', 'audio'),
)
reply.audio.to_wav("reply.wav")
print(reply.text)
```

**curl**

```bash theme={null}
curl -fsS http://localhost:8000/generate \
  -F files=@user.wav \
  --form-string input_modalities=audio \
  --form-string output_modalities=text,audio \
  --form-string streaming=false \
  | python3 -c '
import base64, json, sys

outputs = json.load(sys.stdin)["outputs"]
with open("reply.pcm", "wb") as file:
    for chunk in outputs["audio"]:
        file.write(base64.b64decode(chunk["data"]))
'
```

## Deployment configs

| File | GPUs | Layout | Use |
| - | - | - | - |
| `nemotron_duplex.yaml` | 1 | Encoder, LLM and talker on one GPU | Default |
| `nemotron_duplex_disagg.yaml` | 2 | Encoder and LLM on rank 0, talker with its codec on rank 1 | Pipeline parallelism; same output |

Both set `max_concurrent_requests: 16`. Every per-session resource is sized for 32 sessions, so raising the cap to 32 needs no other change. To serve more, raise the cap together with the `max_slots` of `mamba_state`, `encoder_state`, `encoder_front`, `codec_state` and `talker_prev` (the cap plus one, for the sink), `encoder_kv` (the cap), and the `max_num_pages` of `nano_kv` and `talker_kv`. The server refuses to start with a cap one of them cannot hold. A live call that opens while the server is at the cap ends at once with a 503; one-shot requests queue.

To use an alternative, pass `--config configs/<file>` after the launcher name. From a wheel installation, [copy the shipped YAML](https://docs.m-star.org/serving.md#custom-configs) and pass its local path.

## Settings and defaults

| Knob | Where | Default | Effect |
| - | - | - | - |
| `temperature`, `top_p` | request | 0.7, 0.9 | Agent-text sampling. `temperature: 0` is greedy. The talker's sampling is stochastic by design, and every session draws the same seeded noise. |
| `max_session_s` | deployment `model_kwargs` | 160 | Longest call, in seconds of audio. The talker KV pool grows with it. |
| `max_prompt_tokens` | deployment `model_kwargs` | 512 | Longest system prompt; a longer one is a 400. |
| `max_call_input_mb` | deployment config | 32 in both configs | A live call's input files over its whole life; past it the call ends with a 400. |

## Limits

* A call is capped at `max_session_s`. An upload past it gets a 400, as does a file with more than two channels, and so does a live call whose appends pass it. The server refuses to start with a `max_session_s` past 596 s, where a session's talker positions would pass the talker's 7500-position sliding window.
* `/generate/ws` appends must be 16 kHz audio; they are not resampled one by one. `/v1/realtime` resamples for the client.
* Live audio reaches the model in whole 80 ms frames (1280 samples at 16 kHz). The part of a frame that waits for the next append adds latency, so send 80 ms appends.
* A call that ends with no more than 16 ms of audio fails with a 500.
* `response.create`, `response.cancel` and the item-editing events get an `unsupported` error over `/v1/realtime`; the model decides when to speak. Input transcription and tools are not supported.
* The checkpoint often answers speech not addressed to it, such as a side conversation or background speech. Its model card says it is not suited to noisy environments. Nothing in the serving path tells speakers apart.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.