Repository navigation
feat: record and replay Seed Speech TTS, ElevenLabs Scribe and Audio Isolation - #601
Conversation
commit: |
|
Could a maintainer add the public-api-addition label? The etc/ API report changes only add things: three new endpoint names and the byteplusSpeech provider key. Nothing is removed. |
|
@jpr5 could you add public-api-addition here? The API report changes only add things - nothing is removed. |
…ring userMessage matching is a substring test, so a recorded Seed TTS key of text_prompt plus reference lines also answered any longer prompt that contained it, and the same prompt with other references, in replay and in record mode. End the key with a full sha256 over model, text_prompt and reference hashes, so a recorded fixture only matches an identical request. Hand-written fixtures can still key on part of the prompt.
|
Thanks Tom, this is a great addition. Seed Speech, Scribe and Audio Isolation all fit right into how aimock already does record and replay. We pushed one fix on top of your branch: recorded Seed fixtures were matched by substring, so a recording for "Hello" would also answer "Hello there, traveller." or "Hello" with a different reference voice. Recorded Seed fixtures now match only the exact request, while hand-written prompt-only fixtures still match by substring as your docs describe. Shout if anything looks off. |
**Merging this publishes @copilotkit/aimock 1.48.0 to npm and aimock-pytest 0.7.2 to PyPI.** ## [1.48.0] - 2026-11-10 ### Added - A2A `onConversation()` scripts multi-turn tasks that ask for input, then complete (#591) - Record and replay native citations and annotations from real provider turns (#594) - Record and replay BytePlus Seed Speech TTS, ElevenLabs Scribe and Audio Isolation (#601) ### Changed - `aimock-pytest` 0.7.2 defaults to `@copilotkit/aimock` 1.48.0 ### Fixed - A2A Get/CancelTask return task as `result`; split Responses attachment turns match (#595, #611) ## Version carriers (from `git grep -F 1.47.0`) Bumped to 1.48.0: - `package.json` version - `charts/aimock/Chart.yaml` appVersion - `.claude-plugin/plugin.json` version - `.claude-plugin/marketplace.json` source version (`^1.48.0`) - `docs/index.html` banner - `packages/aimock-pytest/README.md` `--aimock-version` default - `packages/aimock-pytest/src/aimock_pytest/_version.py` `AIMOCK_VERSION` Also bumped: `packages/aimock-pytest/pyproject.toml` 0.7.1 → 0.7.2, because the pin moved (same pattern as #589). Left as is (not carriers): the `## [1.47.0]` CHANGELOG heading, the three "New in 1.47.0" notes in `docs/docs/index.html`, and the three "1.47.0+" notes in the `docs/index.html` comparison matrix. These mark when a feature first shipped. ## README #601 added docs to the speech page but not to the README. This PR adds: - Seed Speech, Scribe and Audio Isolation to the LLMock row and the Multimedia APIs line - `AIMOCK_PROVIDER_BYTEPLUS_SPEECH_KEY` to the upstream-key table The CHANGELOG `#600` reference is corrected to `#601`. #600 is not a PR. The other features already have docs: A2A conversations (#591), citation recording (#594) and the GetTask result shape (#595). The package.json description is synced from the README subtitle on publish. ## Local checks - `pnpm install --frozen-lockfile`, `format:check`, `lint`, `typecheck`, `build`: pass - `api:report`: 14 entries, 0 failed, no report change - `vitest run`: 488 files, 20,073 passed, 11 skipped (includes the docs tests) - `pytest` in `packages/aimock-pytest` against the local build: 251 passed
Closes #600
Record + replay for the three audio routes OpenStory's voice pipeline chains together.
POST /api/v3/tts/create(BytePlus Seed Speech)byteplus-ttsmodel+text_prompt+ one[reference sha256:…]line perreferences[].audio_data{ json, status }POST /v1/speech-to-text(ElevenLabs Scribe, multipart)elevenlabs-sttmodel_id+sha256:<hex>offile{ json, status }POST /v1/audio-isolation(ElevenLabs, multipart)elevenlabs-audio-isolationsha256:<hex>ofaudioaudio/mpeg)X-Api-Request-Idis never part of the key. Matching is substring, so a hand-written Seed fixture can key on the prompt alone.byteplus-speech(Seed Speech lives onvoice.*.bytepluses.com, not the Ark host):--provider-byteplus-speech,AIMOCK_PROVIDER_BYTEPLUS_SPEECH_KEY, injected asX-Api-Key.Implementation notes
src/audio-pipeline.ts, for all three routes.extractFormFieldworks and the bytes hash and proxy unchanged.proxyAndRecordnow accepts aBufferbody (previously string-only, which would have corrupted binary uploads on the way upstream).referencescan be several MB of base64).docs/speech) and CHANGELOG updated.Public API
Additive only: three new
FixtureMatch.endpointmembers and a newRecordProviderKey(byteplus-speech). Needs thepublic-api-additionlabel.Not covered
Seedream on the Ark data plane and the Ark asset control plane (mentioned in the issue as possibly separate) are not in this PR.
Testing
src/__tests__/audio-pipeline.test.ts: record + replay for each route against a stub upstream, byte-exact multipart forwarding (bytes above 0x7f), recorded 429 replay, strict 503, prompt-only hand-written fixture, 400s for missing fields.Locally, two suites fail for environmental reasons unrelated to this diff:
response-a9-equivalence("requires 2 GiB free memory") andunreleased-check-workflow(git tagfails with "no tag message?" under local git config).