Skip to content

Expose custom-schema classification results through the C API - #1292

Merged
0xShug0 merged 1 commit into
mainfrom
fix/capi-custom-schema-output
Nov 15, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
fix/capi-custom-schema-output

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Classification models such as CED and AST-AudioSet successfully compute results, but their custom-schema output was inaccessible through the C API. Add audiocpp_result_custom_schema() to expose the schema identifier and JSON data, with optional output parameters and borrowed strings valid until the result is freed.

JSON uses the existing framework serializer and is cached per result on the first data read. Missing output returns AUDIOCPP_ERR_NOT_AVAILABLE; a NULL result returns AUDIOCPP_ERR_INVALID_ARGUMENT. The ABI minor version increases to 0.4.0, preserving all 76 existing entry points. No model, framework, or kernel behavior changes.

Validation:

  • Reproduced successful CED inference with no accessible result on main.
  • Complete CED and AST-AudioSet schema/JSON results match CLI exactly on CPU, CUDA, and Vulkan: six comparisons passed.
  • Optional output combinations, repeated reads, and borrowed strings surviving producer-handle cleanup passed.
  • Existing offline/streaming C API path tests and shared-library export checks passed; the static library also builds with the new entry point.
  • Added classification coverage to the existing model/parity tests. Linked-model load failures now fail rather than silently skip; genuinely unlinked families still skip.

Closes #1288.

@0xShug0
0xShug0 merged commit 0a71e38 into main Nov 15, 2026
7 checks passed
@0xShug0
0xShug0 deleted the fix/capi-custom-schema-output branch November 15, 2026 00:36
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.

C API: expose TaskResult::custom_schema_output to the result accessors

1 participant