vllm_omni.engine.duplex.audio ¶
Compatibility re-export: the Realtime audio codec moved out of the duplex engine.
Decoding PCM / G.711 / WAV, resampling and re-encoding are wire-format work with no duplex session in them, so the implementation now lives in vllm_omni.protocol.realtime.audio where a non-duplex Realtime surface can use it too. Duplex code reaches it through vllm_omni.protocol.duplex, the one door the engine uses --- which is also where a duplex-specific conversion would be introduced. Import from there in new code.
convert_input_audio_with_rate ¶
convert_input_audio_with_rate(
audio: object,
fmt: object,
*,
sample_rate_hz: int | float | None = None,
target_sample_rate_hz: int = 16000,
) -> tuple[object, object, int | float | None]
convert_output_audio ¶
convert_output_audio(
audio: str,
*,
source_fmt: str,
target_fmt: str,
source_sample_rate_hz: int | None = None,
target_sample_rate_hz: int | None = None,
) -> tuple[str, str, int | None]
encode_float32_mono_wav_base64 ¶
Package normalized mono float32 samples as a PCM16 WAV data payload.