Context
The moss_audio backend already exposes encoder, DeepStack tap, and adapter stage helpers in src/moss_audio.h / src/moss_audio.cpp. A downstream MOSS-Music-8B-Thinking feature pipeline needs a stable way to obtain the final 1280-D encoder stream, taps 8/16/24, and the 4096-D adapted stream together with observed valid-frame metadata, without the 3000-frame mel padding being mistaken for real content.
This request is only for a stable source-level C ABI. Downstream HTTP, CAS publishing, authentication, and rights policy remain outside CrispASR.
Acceptance criteria
Suggested smallest patch
src/moss_audio.h: declare a metadata-returning encoder API and document dimensions, ownership, and single-inflight behavior.
src/moss_audio.cpp: expose the existing per-chunk valid_lens, retain the pre-pad mel length, validate adapter/LLM dimensions, and keep existing symbols untouched.
An optional chunk-local callback may follow the existing moss_audio_process_cb pattern, but it is not required if the metadata-returning entrypoint can return final/tap/adapter tensors without duplicate model execution.
Context
The
moss_audiobackend already exposes encoder, DeepStack tap, and adapter stage helpers insrc/moss_audio.h/src/moss_audio.cpp. A downstream MOSS-Music-8B-Thinking feature pipeline needs a stable way to obtain the final 1280-D encoder stream, taps 8/16/24, and the 4096-D adapted stream together with observed valid-frame metadata, without the 3000-frame mel padding being mistaken for real content.This request is only for a stable source-level C ABI. Downstream HTTP, CAS publishing, authentication, and rights policy remain outside CrispASR.
Acceptance criteria
moss_audio_*signatures. A metadata-returning encoder entrypoint returns the existing tensor andout_T_enc/out_d, plus caller-allocated per-chunk valid-frame counts,out_num_chunks, the pre-padout_T_mel_actual, andout_total_valid.valid_lens; do not derive valid frame counts from a global floor formula.moss_audio.llm.hidden_sizeis 2560 for MOSS-Audio-4B and 4096 for MOSS-Music-8B-Thinking.llm_hiddendisagrees with the adapter output-row shape; do not silently accept a 2560 fallback for a 4096-D checkpoint.out_total_validand that a sub-30-second input does not expose zero-content frames created only by the 3000-frame mel pad.Suggested smallest patch
src/moss_audio.h: declare a metadata-returning encoder API and document dimensions, ownership, and single-inflight behavior.src/moss_audio.cpp: expose the existing per-chunkvalid_lens, retain the pre-pad mel length, validate adapter/LLM dimensions, and keep existing symbols untouched.An optional chunk-local callback may follow the existing
moss_audio_process_cbpattern, but it is not required if the metadata-returning entrypoint can return final/tap/adapter tensors without duplicate model execution.