Repository navigation
Media benchmarking: OpenAI-style speech servers (first audio, real-time factor, duration ratio) - #139
Merged
Merged
Conversation
Benchmark an already-running OpenAI-style POST /v1/audio/speech server through the shared media workload, capture, inspect and compare path: serial requests, streamed first_audio_us, retained reply bodies and headers rechecked offline, a first_audio_us gate and a two-sided duration_ratio gate against the reference arm.
…ostic Speech requests reject prompts over 4096 characters at preflight. Replies record finish_reason (null when the server sends no X-Finish-Reason), inspect rechecks it, and cell and arm summaries count unknowns; a present reason other than stop stays ineligible. The endpoint rejection no longer suggests the serving --local-http flag. Tests cover the character bound and stretched audio.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
grill-perf mediacan now benchmark a running OpenAI-style speech server (POST /v1/audio/speech), so a text-to-speech recipe can require contributors to attach a Grill A/B/A2 result for any speed claim.Runner
media-speech-server-v1: declares the endpoint (plain HTTP only to a literal loopback address, otherwise HTTPS), model, optional voice,response_format(wavorpcm) andstream. The workload isaudio, with input texts of at most 4096 characters.Capture: serial requests against an already-running server; the Grill never starts or stops it. Each sample records:
end_to_end_usand, for streamed replies,first_audio_us;realtime_factor;Non-200 replies, finish reasons other than
stop, partial frames, timeouts and transport failures are kept and marked ineligible with specific reasons, never retried. A missingX-Finish-Reasonis recorded as unknown and counted, since plain OpenAI servers don't send it.Compare:
first_audio_usis gateable only when every arm streams;end_to_end_usstays gateable;duration_ratiocompares audio length against the reference arm, with both directions adverse, so truncated or stretched speech can't pass as faster;Inspect: rechecks bodies and headers offline.
Docs: a MEDIA.md section with a ready-to-copy example; RELEASE-NOTES Unreleased.
Testing
cargo fmt --check,cargo clippy -p grill-perf --all-targets -- -D warnings, unit tests (149), media CLI tests (109), and the full grill-perf suite in round 1.lengthor missing;duration_ratioregressions for halved and doubled audio.Performance claim
None.