Skip to content

feat: mock non-speech audio generation (ElevenLabs, fal.ai, Gemini)#140

Merged
jpr5 merged 3 commits intomainfrom
blitz/audio-gen-118/integration
May 4, 2026
Merged

feat: mock non-speech audio generation (ElevenLabs, fal.ai, Gemini)#140
jpr5 merged 3 commits intomainfrom
blitz/audio-gen-118/integration

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented Apr 27, 2026

Summary

Adds mock support for non-speech audio generation endpoints, closing #118:

  • ElevenLabs sound effects (/v1/sound-generation) and music (/v1/music/*) endpoints with support for generation, streaming, and composition plans
  • fal.ai queue-based audio generation (/fal/queue/submit/*, /fal/queue/requests/*, /fal/run/*) with full lifecycle (submit → status → result → cancel)
  • Gemini HTTP audio via generateContent/streamGenerateContent with inlineData parts containing audio MIME types
  • Gemini WebSocket audio via the BidiGenerateContent Live API
  • Recording/replay for Gemini audio responses (both streaming SSE and non-streaming JSON)
  • Convenience methods: onAudio(), onSoundEffect(), onMusic(), onFalAudio()
  • AudioResponse broadened: audio field now supports both string (base64) and { b64Json, contentType } object form
  • Router: bidirectional endpoint filtering for audio-gen and fal-audio endpoint types
  • Stream collapse: Gemini reasoning/thought accumulation and audio inlineData extraction

Files changed (23 files, +3159/-50)

Category Files
New handlers elevenlabs-audio.ts, fal-audio.ts
Modified handlers gemini.ts, ws-gemini-live.ts, speech.ts
Infrastructure server.ts, router.ts, types.ts, helpers.ts, recorder.ts, stream-collapse.ts, llmock.ts, index.ts, fixture-loader.ts
Tests (6 new) elevenlabs-audio.test.ts, fal-audio.test.ts, gemini-audio.test.ts, gemini-audio-record.test.ts, ws-gemini-live-audio.test.ts, multimedia-types.test.ts
Docs index.html, mcp/index.html, sidebar.js

Test plan

  • 2584 tests pass (6 new test files, 36+ new tests)
  • tsc --noEmit clean
  • prettier --check clean
  • eslint clean
  • 3-round CR (7 agents per round) converged to 0 critical/high findings

Closes #118

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@140

commit: 60ec694

@jpr5 jpr5 force-pushed the blitz/audio-gen-118/integration branch from 70ace03 to 0fe22fb Compare April 27, 2026 19:14
@tombeckenham
Copy link
Copy Markdown
Contributor

Just created tests with this for the elevenlabs adapter. It's looking good!

@jpr5
Copy link
Copy Markdown
Contributor Author

jpr5 commented May 3, 2026

@tombeckenham final answer?

@jpr5 jpr5 force-pushed the blitz/audio-gen-118/integration branch from e8ad015 to 60ec694 Compare May 4, 2026 16:41
jpr5 added 3 commits May 4, 2026 09:44
New handlers for ElevenLabs sound effects/music and fal.ai queue-based
audio. Gemini HTTP and WebSocket audio via inlineData parts. AudioResponse
broadened to support base64 string and {b64Json, contentType} object.
Convenience methods: onAudio(), onSoundEffect(), onMusic(), onFalAudio().
Router endpoint filtering for audio-gen and fal-audio types. Closes #118.
6 new test files covering ElevenLabs, fal.ai, Gemini HTTP/WS audio,
recording, and multimedia type broadening. Non-speech audio rule added
to competitive matrix test. 36+ new tests.
MCP server docs page. Non-speech audio row added to competitive matrix
(aimock-only capability). Provider count updated 12 to 13 (Gemini
Interactions). Multimedia feature card updated. Auto-update script synced
with providerGroups and FEATURE_RULES. Changelog for PR #140.
@jpr5 jpr5 force-pushed the blitz/audio-gen-118/integration branch from 60ec694 to 031e243 Compare May 4, 2026 16:44
@jpr5 jpr5 merged commit 44bda16 into main May 4, 2026
21 checks passed
@jpr5 jpr5 deleted the blitz/audio-gen-118/integration branch May 4, 2026 16:44
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.

Mock music / non-speech audio generation (Gemini Lyria, ElevenLabs, fal)

2 participants