TECHNOLOGY

Pa_IsFormatSupported: validate the complete duplex configuration

In this article
THE QUICK TAKE

Pa_IsFormatSupported takes optional input and output parameter structures plus a sampling rate. For a duplex request, that rate applies to both directions. The suggested-latency field is ignored by this query, so a supported result does not validate a requested latency target. A successful format check is also distinct from successfully opening and running the stream under current resource conditions. These boundaries explain why a capability probe cannot stand in for actual microphone-to-sp.

A microphone and a speaker can each support an audio format independently while the requested full-duplex configuration remains unavailable. PortAudio provides a format-support query for the complete selected input and output parameters. A voice application should validate that combined request instead of combining unrelated capability statements into an assumed duplex guarantee.

The audio contract

Pa_IsFormatSupported takes optional input and output parameter structures plus a sampling rate. For a duplex request, that rate applies to both directions. The suggested-latency field is ignored by this query, so a supported result does not validate a requested latency target. A successful format check is also distinct from successfully opening and running the stream under current resource conditions. These boundaries explain why a capability probe cannot stand in for actual microphone-to-speaker readiness.

Implementation details

Build the exact parameter structures that will be used for opening, including chosen devices, channel counts and sample formats. Probe the combined configuration, preserve the returned error reason and avoid silent fallback to a different rate. If fallback is an intentional product policy, expose the effective parameters and perform any necessary waveform conversion explicitly. Check opening and starting as subsequent stages. Measure actual buffering and callback behavior separately when claiming responsiveness, since this support query deliberately leaves the suggested latency outside its acceptance decision.

A constructed validation case

Prepare a supported duplex case and a combination rejected by the chosen host implementation. Compare the exact probe parameters with those passed to opening so the application cannot validate one configuration and use another. Vary only suggested latency and verify that the test does not mislabel the capability result as a measured latency outcome. Add an opening failure after a successful probe. Acceptance requires separate support, open and run states, with the actual effective rate retained for downstream model preprocessing.

Operational limits

A working stream does not establish that captured speech meets a model’s acoustic or language requirements. It establishes a concrete transport from the selected audio devices. Keep capability checks, real-time measurements and model-quality evaluations separate so a successful low-level probe is not promoted into an unsupported service guarantee.

Primary references

Portaudio Api; Portaudio Header.

This is a proposed voice-system validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the quality or timing of a deployed voice service.

Moshi full-duplex dialogue: model streams do not remove microphone echo handling; Audio resampling for datasets: keep timestamps aligned when sample counts change.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles