Skip to content

Studio: record audio directly for chat models - #16078

Closed
Aafimalek wants to merge 2 commits into
unslothai:mainfrom
Aafimalek:feat/issue-16056-audio-recording
Closed

Aafimalek wants to merge 2 commits into
unslothai:mainfrom
Aafimalek:feat/issue-16056-audio-recording

Conversation

@Aafimalek

Copy link
Copy Markdown
Contributor

Summary

Closes #16056.

Add a separate recording control to the chat composer for audio-input models. It captures a WAV from the selected microphone and attaches it using the existing audio attachment path, without sending the recording through speech-to-text. Dictation remains available separately.

Recording stops within five minutes and the existing audio size limit. Cancelling, closing the dialog, changing chats, or losing the active composer releases the microphone. A late permission or attachment result is discarded when its composer has gone away.

Verification

  • npm run typecheck and npm run build passed on Windows.
  • node --experimental-strip-types --test tests/pcm-recorder.test.ts tests/audio-source-input.test.ts: 36 passed.
  • tests/studio/playwright_chat_audio_recording.py passed with Chrome and its simulated microphone. It checks the WAV attachment, cancellation, Escape, a delayed microphone request, and chat-switch cleanup. The test runs in the existing UI CI shard.
  • pytest -q tests/studio/test_playwright_suites_run_in_ci.py tests/studio/test_chat_ui_shards_cover_everything.py: 36 passed.
  • Focused ESLint and Python Ruff checks passed; the smoke fixture has two Fast Refresh warnings.

The browser test exercises recording and the production attachment adapter; it does not run inference with a real audio model or GPU.

@danielhanchen

Copy link
Copy Markdown
Member

Thank you so much for working on this, @Aafimalek, and for the effort you put into direct microphone recording for audio-input models! This is now superseded by #16976, which was just merged and covers the same feature from issue #16056 (the mic records a WAV clip and attaches it to the message when an audio-input model is loaded, behind an opt-in Voice setting). Closing this one in favour of that, but we really appreciate the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Direct Microphone Input for Audio-Accepting Models

2 participants