Stream Spark speech with bounded audio and canonical voice profiles - #37
Merged
Merged
Conversation
The gateway inlined installed profile references in two places. Keep the resolver's version, which also covers remote clone backends, and give it the registry containment, no-follow open and size checks the server copy had. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
# Conflicts: # package.json # src/server.mjs
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
backends/spark-audio: a one-checkpoint-per-process Qwen3-TTS / Whisper adapter for Spark hosts, with an optionalfaster-qwen3-ttsCUDA-graph engine.POST /v1/audio/speechwithstream: trueandresponse_format: pcmnow streams raw PCM16 through the gateway (JSON and multipart). WAV stays buffered, and upstream validation errors still come back as buffered JSON with their status.realpathcontainment check against the voice registry, anO_NOFOLLOWopen, and a 16 MiB cap.x-audio-sample-rate/x-audio-channels/x-audio-format, and ends a binary response by destroying the socket instead of appending JSON to audio.Also folds in the ennspark03-only fix
306d84b(upload installed voice references to remote clone backends). Its resolver-side inlining replaces the duplicate server-side copy, and now has the same registry containment,O_NOFOLLOWand size checks, with a symlink-escape test.Rebased from
improve/avatar-calls-20260923. That branch's checkpoint commit (ACE-Step diffusers + Qwen 3.8 NVFP4 recipe) is left out because it lands with the video-workflow work.Test plan
node --test test/speech-stream.test.mjs(12 pass)node test/voice-profiles.test.mjs,node test/tts-catalog.test.mjs,node test/protocol.test.mjspytest backends/spark-audio/test_lloom_audio_cuda_server.py(53 pass, fake models)🤖 Generated with Claude Code