[Bugfix][Frontend] Preserve duplex chat audio format and duration (#7316)

Signed-off-by: Nolen Liang <nliang@nvidia.com>
This commit is contained in:
bcsdhjew authored and GitHub committed 2026-09-14 09:05:55 -07:00
1 parent 1b6cd282f0
commit e0c4f97f32
13 files changed
+684 -40

No files matched your search

@@ -421,9 +421,23 @@ class CreateAudio(BaseModel):
arbitrary_types_allowed = True
class AudioChunkMetadata(BaseModel):
"""Waveform dimensions after transforms, before encoding.
Frames count samples per channel, not interleaved scalar samples or bytes.
For compressed formats this excludes any padding introduced by the codec.
"""
format: str = Field(min_length=1, strict=True)
sample_rate_hz: int = Field(gt=0, strict=True)
frame_count: int = Field(ge=0, strict=True)
channels: int = Field(gt=0, strict=True)
class AudioResponse(BaseModel):
audio_data: bytes | str
media_type: str
audio_metadata: AudioChunkMetadata | None = None
# --- Batch Speech Models ---