Skip to content

Audio: generator audio-input support (format interface + OpenAI-compatible audio) - #1

Closed
codingshreyash wants to merge 6 commits into
base/mainfrom
pr/audio-generator
Closed

Audio: generator audio-input support (format interface + OpenAI-compatible audio)#1
codingshreyash wants to merge 6 commits into
base/mainfrom
pr/audio-generator

Conversation

@codingshreyash

@codingshreyash codingshreyash commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Adds the generator-side support the audio probes need to send audio to a target:

  • A format-capability interface on Generator (supported_formats() + per-modality format sets) so probes can check what a target accepts and skip cleanly when a format is unsupported.
  • OpenAI-compatible audio input handling: a MIME-subtype map and an OpenAIAudioCompatible base for endpoints that accept input_audio content.

No generators are added here; the target-under-test generator (VoiceChat) lands in a follow-up that builds on this. Output stays text-only per garak convention.

Verification

  • python -m pytest tests/generators/test_openai_compatible.py
  • Verify a probe skips a target that does not advertise audio support rather than erroring mid-run

(Fork review draft; upstream target feature/technique_intent.)

Adds a format-capability interface to the generator base so probes can query
which audio/image formats a target accepts and skip cleanly when a requested
format is unsupported, instead of failing part-way through a run. Adds
NVAudioTranscription, a generator for NVIDIA's transcription NIM, as the first
consumer of the interface.

Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
- NVAudioTranscription now validates inline (raw-bytes) audio against
  audio_formats using the mime the message carries, and forwards the real
  content type, instead of labelling every payload as WAV.
- OpenAICompatible.audio_formats is derived from audio_mime_subtype_formats'
  values so supported_formats() cannot advertise a format the request builder
  is unable to send. Adds tests for both paths.

Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
Per review: generators abstract communication to the target and return text;
an ASR-target generator with a private-endpoint default doesn't fit. This PR
now carries only the generator audio-format interface and OpenAI-compatible
audio input support that the audio probes and the VoiceChat target rely on.

Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
@codingshreyash codingshreyash changed the title Audio: generator format interface + NVIDIA transcription target Audio: generator audio-input support (format interface + OpenAI-compatible audio) Jul 22, 2026
The parametrized multiprocessing test drives a text prompt; audio-only targets
(e.g. NVVoiceChat) cannot process it, so filter them out by input modality.

Signed-off-by: Shreyash Ranjan <shrranjan@nvidia.com>
@codingshreyash

Copy link
Copy Markdown
Owner Author

Closing as superseded. NVIDIA#1770 now supplies the generator-format/PETTS foundation, while the remaining provider/provenance work is isolated in #2 and the target adapter in #3. The pr/audio-generator branch is retained; no branch was deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant