For now, from what I could find so far about running two independent CUDA processes on Windows:
Short answer to the two questions
1. Is there a better way to share a native-Windows GPU between two independent CUDA processes? I could not find an off-the-shelf Windows mechanism that gives one process a reliable TTS playback deadline while another continuously submits LLM decoding work. NVIDIA’s MPS documentation lists Linux and QNX support, not native Windows. CUDA stream priorities are scheduling hints, not real-time deadlines or guaranteed immediate preemption. NVIDIA’s Best Practices Guide describes separate CUDA contexts as time-sliced. That makes scheduling interference plausible, but does not by itself identify which device or host-side delay dominates in your test.
For the configuration you measured, keeping both model services loaded while explicitly taking turns on GPU-intensive generation looks like a sound practical baseline. This does not stop audio playback while the LLM runs: the device can keep playing previously generated PCM. I would not replace this working design with MPS, a single-process integration, or GPU partitioning without a measurable benefit that justifies the additional work.
2. Would turn-taking still win on a different GPU? Not necessarily. The useful test is whether TTS, while the LLM is generating, can deliver the needed PCM before the playback buffer runs out, including the slowest relevant chunks. If it does so reliably, overlap may let the LLM finish the answer sooner. If it misses those deadlines, turn-taking can give a better listening experience even if complete text generation takes longer. GPU model, VRAM size, and average TTS real-time factor alone do not determine the result. The first-to-second PCM interval, cold starts, long answers, and dedicated-memory residency all matter.
The paired benchmark already provides a useful reference: the matched plain and turns runs used identical generated text for each question/seed pair. In the long-sentence condition, predicted playback gaps appeared in 6/6 runs without turn-taking and 0/6 with it. Those are predicted underruns with the project’s simulated 0.5-second playback buffer, not a direct microphone or speaker measurement, and not a result on another GPU. The broader improvement from roughly 4.59 seconds to 0.09 seconds of estimated gaps also involved changes in the TTS engine and LLM placement; it should not all be attributed to scheduling alone. The results and measurement notes keep the two comparisons separate.
Practical default
I would retain the current sentence-level cooperative handoff as the reference behavior for this Windows/8 GB setup. Both services stay loaded; the application yields GPU-heavy generation to TTS when a speech segment needs synthesizing. That directly addresses the observed stuttering without making an OS-level GPU priority guarantee a dependency. The unsuccessful LLM token-rate limits and WDDM priority experiment are already documented, so simply repeating those would add little.
If further tuning would be useful, the least expensive informative step is one short timestamped PCM trace, not a CUDA rewrite. Record when the first few PCM reads arrive and how much audio each contains, preferably alongside TTS begin/end and LLM pause/resume events. If the trace covers the first predicted gap, it can help distinguish startup buffering, synthesis pacing, and handoff timing. If the result is already smooth enough, this is optional rather than homework.
A compact decision guide for another GPU
Can the required GPU allocations remain resident in dedicated memory?
No / uncertain / shared-memory spill observed:
Stabilize memory residency first; the scheduling comparison is confounded.
Yes:
Compare concurrent LLM+TTS against cooperative turn-taking,
using the same text, TTS setup, and playback-buffer rule.
Does concurrent TTS deliver PCM before the playback buffer empties?
Yes, with margin across cold starts and long answers:
Concurrent operation is worth considering. Compare text finish
time, audible startup, longest gap, and interruption behavior.
No, or only particular chunks miss their deadline:
Retain turn-taking as the reliability baseline. Find the first
missed deadline and distinguish startup, handoff, synthesis,
delivery, and memory causes before changing the scheduler.
There is a small separate question about the roughly 0.13–0.14-second early estimated gaps in two final-stage standalone runs. If these are perceptible on the actual device, a first-PCM timeline or a small buffer-sensitivity check could be informative. It is not necessary to establish the value of the existing turn-taking result.
The following details are optional background and reproducibility notes for someone testing another GPU or attempting to locate the remaining latency.
1. What Windows/CUDA can and cannot control
Residency, concurrency, and deadlines are different properties
Fitting two model services into an 8 GB GPU requires a budget for resident weights, KV caches, compute buffers, contexts, and other processes. Parts deliberately kept in CPU RAM belong in a separate budget. It does not mean that their CUDA work receives fair latency or executes concurrently in a way useful to speech. Even if sampled GPU utilization looks moderate, the next TTS step might still miss its playback deadline. Conversely, reducing overlap can improve continuity without reloading either model, and the audio device can keep consuming buffered output while the GPU works on the next part of the response.
In this setup, TTS alone is reported at RTF around 0.6; concurrently decoding with the LLM raises the first sentence to roughly 1.1–1.6. That strongly supports interference under overlap at the observed application boundary. It does not locate the dominant cause among context scheduling, kernel launch/occupancy, synchronization, bandwidth, CPU stalls, and clocks.
NVIDIA’s Best Practices Guide makes context time-slicing plausible, not demonstrated here. CUDA stream priority is no hard deadline; Windows CPU or WDDM priority is another mechanism again. The already unsuccessful throttling and priority experiments do not need repeating without new evidence.
Why MPS is not the missing Windows flag
NVIDIA’s MPS deployment guide explicitly restricts MPS to Linux and QNX. MPS can sometimes increase cross-process concurrency on a supported OS, but switching this working Windows assistant to Linux would entail revalidating the native qwen3-tts.cpp build, llama.cpp, model conversion, Python bridge, audio and board transport, memory use, and startup timing. Even an MPS-enabled setup still needs end-to-end PCM deadline measurements. I would treat Linux/MPS as a separate research branch, not the default fix here.
A coordinated single-process execution policy could offer finer control, but integrating native engines introduces allocator, context, crash-isolation, cancellation, and maintenance costs. CUDA Green Contexts permit explicitly managed resource subsets on supported configurations. They do not transparently isolate arbitrary existing Windows CUDA processes, and a smaller GPU partition might also slow the TTS itself.
Practical hierarchy for the current arrangement:
- Preserve the measured cooperative turn-taking and dedicated-memory residency.
- Measure and, if justified, refine the handoff boundary or initial buffering without changing the engines.
- Consider bounded overlap only if a trace shows consistent spare deadline margin and there is a reason to finish text sooner.
- Consider a shared-process scheduler, Green Contexts, a different OS, or a second accelerator only as explicitly costed architecture alternatives.
The useful optimization target is continuous playback with acceptable response time, not simultaneous kernel execution for its own sake.
2. What the published experiments establish
A clean scheduling comparison versus a multi-change progression
The benchmark description separates sentence length and GPU turn-taking in a 2-by-2 design. There are three questions with two seeds per question, tested in plain and turns modes. The harness resets the llama-server prompt cache before each run, alternates the modes, and uses an idle interval so cold clocks are represented. In the captured run records, all 12 matching prompt/seed pairs produced identical answer text across the two scheduling modes. That is a valuable control: changing the amount of text would otherwise change both speech duration and the opportunity for stalls.
The reported median results are:
| Condition |
First-audio estimate |
Total predicted gap |
Runs with gaps |
| Long sentences, no turn-taking |
3.20 s |
2.27 s |
6/6 |
| Long sentences, turn-taking |
1.83 s |
0 s |
0/6 |
| Short sentences + 0.9 s pause, no turn-taking |
2.62 s |
0.48 s |
4/6 |
| Short sentences + pause, turn-taking |
1.42 s |
0 s |
0/6 |
The short-sentence condition changes utterance length and the TTS pause policy as well as the text produced. It is useful as a second factor in the study, but the cleanest estimate of scheduling comes from comparing plain and turns within the same sentence-length condition. The long-sentence benchmark produced roughly 67–118 seconds of audio; some short-sentence runs were far shorter. The project’s pitfall log notes that an early single successful short-answer result did not survive repeated longer trials. That is a useful reminder: testing only the first few seconds can hide a buffer deficit that accumulates over a longer answer.
The separate four-stage standalone pipeline comparison starts with PyTorch TTS on GPU and LLM on CPU, then changes engine and LLM placement before introducing turn-taking. It reports about 4.4 to 2.3 seconds for its first-PCM-oriented time metric and 4.59 to 0.09 seconds of estimated gaps. That shows substantial end-to-end progress, but the experiment answers a broader question than the paired scheduling benchmark. It does not isolate turn-taking as the cause of every improvement, and the two studies use different buffering and measurement boundaries. Keeping them separate makes the successful work easier, not harder, to reproduce.
What remains unmeasured
For a portable comparison, record the RTX 4060 Laptop 8 GB / Windows 11 / 16 GB RAM baseline, Gemma 4 E4B QAT q4_0 via llama.cpp, and Qwen3-TTS 1.7B through the patched GGUF engine, together with driver, exact model/engine revisions, audio buffering, and context configuration. See the project’s measurements.
3. Why the audio buffer, not average GPU utilization, decides continuity
Think in playable seconds
A TTS service produces PCM in increments. Each increment contains some duration of future playback; the speaker consumes available duration at one second per second. If arrivals are bursty, the queue can reach zero even if average generation across the answer is faster than playback. What matters is the earliest time the next required audio becomes playable, relative to the accumulated headroom at that moment.
A useful conceptual quantity is the amount of playable audio remaining in the queue after each arrival. On arrival, add that chunk’s audio duration; between arrivals, subtract elapsed playback time. A predicted underrun occurs if the queue empties before the next portion arrives. This requires timestamps and audio durations; a count of chunks by itself is insufficient, since one chunk might be 80 ms and the next two seconds. Initial buffering, intentional inserted silence, tail processing, and device-side consumption also affect the observation.
Consider a simple illustrative sequence, not measured data from this laptop:
Time (s) Arriving PCM Playable audio remaining
0.0 0.50 s 0.50 s; playback starts
0.2 0.80 s 1.10 s
1.0 0.20 s 0.50 s
1.8 1.00 s buffer had emptied before this arrival
Even though a later burst could bring the overall average back above real time, there was a real playback deadline miss. Conversely, a slow inter-chunk computation need not be audible if earlier PCM provided enough headroom. This is why an inter-chunk gap is not automatically an audible gap: both the interval and the buffer state matter.
RTF is informative but not sufficient
RTF is approximately generation wall time divided by output audio duration. For a comparable interval, RTF below 1 means the measured synthesis was faster than the duration of its generated audio. A value above 1 means the producer is slower than playback on that interval. However, one whole-sentence RTF value can conceal a particularly late first block, an uneven codec window, or a long end-of-sentence step. Conversely, even a locally slow chunk need not cause an audible gap if earlier chunks supplied enough headroom. Use the actual arrival series to determine a deadline miss.
Startup and sustained continuity are different subproblems
If all significant gaps occur near the beginning, the first-produced-audio policy and startup buffering deserve attention. If gaps appear only later in long answers, the system may be slowly consuming earlier headroom, or may hit specific chunk-size/codec-window boundaries. If they coincide with LLM resume, a control handoff or GPU scheduling delay becomes more plausible. If stalls appear after PCM was already emitted by TTS, investigate transport, the consumer queue, or device playback before editing CUDA scheduling.
These distinctions give an inexpensive interpretation route for another GPU’s data. A fast model is not automatically a smooth streamer, and a good streaming result is not evidence that every CUDA resource-sharing problem was solved. The real comparison is a particular implementation delivering a particular PCM time series under a stated buffering rule.
4. A practical comparison on another GPU
For someone with a different card, I would reuse the existing paired benchmark harness before inventing a new test. The question is not which GPU reaches the highest token/s number in isolation; it is which scheduling policy satisfies the voice output’s continuity requirement for a comparable answer.
A small, useful comparison would have the following properties:
- Comparable pairs. Use identical question, seed, text, voice, language, model revisions, quantization, TTS parameters, and buffer rule. Verify text hashes; identical seeds alone may not imply identical text because cache state can change results.
- Comparable GPU state. Note cold/warm clocks; alternate test order. Check for duplicate TTS processes or unrelated GPU users.
- Comparable buffers. The simulator assumes 0.5 s startup buffering, while the standalone sender estimates 0.3 s. Do not silently combine their timing metrics.
- Stable residency. Capture dedicated and shared GPU memory. The published 7,448 / 8,188 MiB is whole-card usage, not weights alone; caches and desktop processes matter.
- Useful output metrics. Record audio duration, first-audio endpoint, LLM completion, longest and total gaps, and whether any runs had gaps. A handful of matched long answers may be more informative than peak GPU utilization.
A compact community result could look like this (fields only, no invented results):
GPU / VRAM / power limit / driver / OS:
LLM model + quantization + llama.cpp revision:
TTS engine + model revision + voice prompt:
Dedicated/shared GPU memory during the run:
Cold/warm policy; text hash; answer audio duration:
Playback model / initial buffer / metric definitions:
mode first-audio-s text-done-s gap-total-s worst-gap-s
plain ... ... ... ...
turns ... ... ... ...
If available: first PCM time, first-to-next PCM interval,
number of runs with gaps, and the location of the worst gap.
The minimum experiment does not require changing the model or collecting hundreds of runs. A different GPU tests how well the policy transfers, not necessarily the same Windows scheduling mechanism: drivers, OS, kernels, and available resources may differ. A well-specified result remains valuable without claiming a universal winning scheduler.
5. Small timing traces and measurement boundaries
A low-cost check before a GPU profiler
The TTS HTTP service emits PCM, and the existing comparison simulator already associates receive times with PCM read sizes. Consequently, a small trace can expose the earliest missed deadline without a new engine, a CUDA build, or an external benchmarking framework.
If a diagnosis would be useful, timestamp only the first few chunks and the interval around the first underrun in one or two runs. Useful events, in order of increasing instrumentation effort, include:
- Monotonic timestamp when a PCM read completes, plus byte count, sample format and its playable duration.
- Sentence ID, TTS request acceptance, first PCM emitted by TTS, and synthesis completion.
- LLM sentence handoff and continuation events, if the suspected stall coincides with resuming LLM decode.
- PCM enqueue, optional tail-hold release, and outbound audio-frame send, if the standalone device path is the subject.
- Receiver/playback timestamp, only if actually measurable; do not substitute a server event and call it an acoustic observation.
For 24 kHz, mono, signed 16-bit PCM, audio_s = bytes / 48000. This assumes uncompressed PCM and counts samples as playable duration, not elapsed wall time. A compact line-oriented trace could use a shape such as:
run,mode,sentence,event,monotonic_s,pcm_bytes,pcm_audio_s
01,plain,0,tts_start,...,0,0
01,plain,0,pcm_received,...,...,...
01,plain,0,pcm_received,...,...,...
01,plain,0,tts_done,...,0,0
01,plain,0,llm_resume,...,0,0
These are column names and placeholders, not measurements. Within one host, monotonic times from processes using a shared OS clock basis can be compared; record the clock source. Across PCs, boards, or unsynchronized time domains, align clocks or compare durations recorded by the same observer; an ESP32’s timestamps are not automatically interchangeable with Python’s time.monotonic().
With this trace it becomes possible to replay different simulated buffer policies. Start playback when the chosen amount of audio has accumulated, subtract playable seconds as time elapses, add audio as it arrives, and mark each interval of depletion. Keep the treatment of initial silence, added sentence pauses, short final blocks, and rebuffering explicit. The earlier aggregate-only benchmark records cannot, by themselves, reconstruct an accurate new buffer sweep because their per-read arrival sequence was not retained in the summary. New tracing would provide that missing evidence.
Two different ‘first audio’ numbers in the existing project
There is a subtle but useful measurement boundary here. In the standalone session code, the first-audio observation is taken when the server’s session loop receives its first PCM event. Further processing occurs before outbound packets are sent, including an intentional waveform tail-hold mechanism. The tail_hold_ms value controls retained waveform duration, not an automatically equal wall-clock delay. The ESP32’s acoustic first sound happens downstream of this observation.
In the PCM simulator, first_audio_s instead means enough PCM has arrived to meet the 0.5-second threshold; it is not the first byte or acoustic onset. A full read(2880) represents 60 ms of 24 kHz mono s16 audio. The standalone Pacer models 60 ms sends with a five-frame (300 ms) prebuffer, but cannot see the physical receiver’s queue.
None of this negates the observed improvement. It means that a new comparison should label its timing endpoint, especially if initial response is part of the optimization. First TTS PCM, first server send, first device decode and first audible non-silent sample are different milestones. A slightly slower reported server timestamp can even accompany more continuous physical playback, depending on how buffering and shaping are arranged.
If the remaining small startup gaps matter
The final standalone stage has two estimated early gaps of roughly 0.13 and 0.14 seconds, with the later part of those long answers remaining smooth. This pattern suggests an inexpensive conditional check: examine the first PCM events first, then compare buffer assumptions such as 5, 7, and 9 frames (300, 420 and 540 ms at 60 ms/frame). Measure the predicted shortfall and the selected first-audio endpoint, rather than assuming more prebuffer is free or creates an exactly proportional delay. The Pacer schedules outbound frames using its own clock; changing its prebuffer parameter does not by itself measure the ESP32’s actual internal playback latency.
If no one can hear the residual event, the benefit of chasing it may be small. If it is audible and only the first segment is affected, it may be possible to improve startup pacing without altering the successful GPU handoff policy at all.
Cooperative handoff is not a GPU mutex
The paced llama.cpp provider streams short token batches (default 16), yields after a sentence terminator or the token limit (default 48), and consults the TTS /health endpoint. It uses the busy flag and an increasing started counter to detect that a sentence was accepted; there is a bounded pickup wait and a bounded TTS wait. If status collection fails, this path intentionally avoids waiting indefinitely. This is cooperative timing, not a cross-process CUDA mutual-exclusion primitive. A delayed splitter, timeout, or unavailable health endpoint may permit some overlap, depending on the integration.
The standalone service has a related but distinct control path: its worker naturally obtains further LLM text only after completing the current TTS segment, so it is already serialized at the relevant boundary without requiring the same /health polling loop. For a future extension, it is important to measure the specific integration being discussed rather than treating both paths as identical implementations.
These are architectural details for understanding behavior, not evidence that the observed benchmark was invalid or that a new bug is present. If logs ever show overlapping LLM and TTS work in a supposedly protected segment, the handoff state machine is a sensible first place to inspect before moving down to CUDA kernels.
6. If a CUDA-level cause becomes the question
A PCM trace establishes where the application first observes lateness. If the objective becomes distinguishing device queueing from host synchronization, context switching, launch overhead, or clock behavior, Nsight Systems is a suitable next step. A useful short window includes LLM decode, TTS’s first two PCM emissions, and any handoff. Compare CUDA API submission with kernel activity, CPU waits and WDDM scheduling where supported. A delayed kernel launch and a kernel that was submitted promptly but waited on the GPU imply different follow-ups.
Nsight Systems documents --cuda-trace-scope=system-wide and WDDM tracing, but same-user, privilege, and launch-after-collection-start conditions matter when observing two separate processes. Verify the installed version’s help and GPU support before selecting flags; system-wide trace collection may not see processes launched too early or under another user. Keep profiling windows short and compare against an unprofiled run because tracing can perturb timing. This is optional: a profiler is unnecessary if the purpose is simply selecting the scheduling policy that already gives smooth audio.
7. Related reports worth separating by mechanism
The following cases suggest diagnostics, not an established common root cause:
- vLLM-Omni #4913 reports Qwen3-TTS chunk 0 being only 80 ms long, followed by a much later chunk under concurrent requests, with some measured intervals slower than real time. That stack includes an Ascend NPU/fork, not the same Windows CUDA engines. It illustrates why first-to-next chunk timing can matter more than a satisfactory average RTF.
- vLLM-Omni #2568 describes periodic gaps associated with multi-request codec-window scheduling and compares batching/placement options. That is a different concurrent-TTS workload. Its transferable idea is to test whether late chunks have a pattern tied to a processing boundary; it is not proof of the GPU context hypothesis here.
- faster-qwen3-tts PR #78, merged in March 2026, added a queue-backed persistent audio player because blocking playback of each chunk could prevent a pull-based generator from producing the next one. This is a useful counterexample: apparent generation stutter can be introduced by consumer code even when GPU production is sufficiently fast. The original project’s PCM simulator has a different structure.
- Pipecat #5572 documents how a TTS speaking-pause gate can delay upstream control frames and therefore defer subsequent LLM inference or tool replies. It illustrates a future interaction concern, not an explanation for the published audio underrun measurements. The associated PR #5573 proposes a direction-aware change; check its status before treating it as a released fix.
Across those distinct reports, the useful common practice is to timestamp generation, delivery, and consumption separately. Similar audible symptoms can come from different boundaries. A link should be useful because it suggests something measurable, not because both issues happen to mention TTS or stuttering.
8. Conditional edge cases and a reusable takeaway
The current result does not require solving every future voice-agent concern. Still, if the project grows, the important conditions change. An additional model, voice prompt, or process may trigger Windows dedicated-to-shared GPU memory migration; check residency again before blaming scheduling. Cold GPU clocks can affect the first segment even when sustained throughput is healthy. More aggressive overlap can improve full-text latency but damage TTS deadline margin. Longer initial buffering can protect playback but may affect responsiveness; measure the precise output endpoint, not just an internal counter.
Interruptions, tool calls, multiple clients, cancellation, and new sentence-splitting rules introduce control-flow requirements beyond this paired benchmark. In particular, protecting the TTS synthesis lane need not mean blocking upstream tool results or cancellation events until playback ends. Those are future design branches, not defects established by the current tests.
For future readers, I would preserve four things together: the exact software/hardware and model revisions, an unambiguous PCM/playback timing definition, paired plain versus turns runs with matching generated text, and the earliest missed deadline. The reproducible benchmark already supplies much of that foundation. The source paths linked here are pinned to project commit ef55f3b90aaa0f72a0e6bc4de8cf4e0d74d56eba so a later change on main is not mistaken for the code that produced the reported measurements.
In short, the current turn-taking result is useful on its own. Whether another GPU should overlap LLM and TTS is an audio-deadline experiment, not a verdict based on GPU utilization; identifying the precise Windows CUDA bottleneck is a separate, optional investigation.