跳到正文
Skillpedia
网站与界面(前端)7.6k · #13190

voice-transcription

它能做什么

这项技能说明侧边栏消息框中的语音听写如何工作:麦克风用于听写,另有独立的实时语音聊天选项。适合修改麦克风行为或语音设置的开发者。

适用场景

  • ✓当你要修改侧边栏消息框中麦克风的工作方式的时候。
  • ✓当你要修改语音转写设置或转写路径的时候。
  • ✓当你需要了解听写使用哪个转写来源的时候。

技能链接

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/voice-transcription/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/voice-transcription/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请修改聊天框中的麦克风,让我一点击它就立刻开始听写。”

每周 5 个新技能,1 分钟读完。

工作原理

麦克风会立即开始可编辑的听写,使用所选的转写来源,例如 Mac Native、Google Realtime 或 Batch。清理功能和服务商密钥需单独设置。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Voice Transcription

The sidebar composer offers two distinct paths: the mic always starts editable dictation, and the empty-draft primary button starts an opt-in realtime speech-to-speech agent session. Users configure dictation separately from AI cleanup. The source picker (Mac Native, Google Realtime, Batch) is the Voice transcription row on Settings › Account › Preferences (VoiceTranscriptionSection compact, anchor voice); cleanup and batch provider keys stay in the agent sidebar's Voice Transcription section. Both write the per-user voice-transcription-prefs application state. Both paths are available in every template that renders the shared agent sidebar.

UX rules

  • Always show the mic alongside the send button. Replacing send with the mic when the composer is empty confuses users, so keep both visible.
  • The mic is dictation, with no chooser. A click starts dictation at once; the browser's permission prompt is the only step in between. A blocked, missing, or busy microphone shows the amber composer notice with Try again, and the mic stays clickable. Do not read voice-input-preference app state.
  • Voice chat lives in the primary slot. With an empty draft, no run, no dictation, and a ready realtime provider (Builder or OpenAI), Send shows a voice-chat glyph and starts realtime voice. Any draft (text, attachment, Plan chip) turns it back into Send; without a provider it is a dimmed Send.
  • Dictation is click-to-toggle, not push-to-talk. More forgiving in a sidebar, avoids host-app hotkey clashes. Keyboard shortcut is Cmd/Ctrl+Shift+M and Escape cancels mid-recording.
  • Transcript lands in the composer, editable, never auto-sent. Insert at the caret via editor.chain().focus().insertContent(text).run().
  • Recording grows from the mic. While dictating, the mic's slot becomes a pill with a waveform driven by the analyser level (written from an animation frame, never through React state) and a stop button. Stop inserts the transcript; Escape cancels. Under reduced motion the bars stay still.
  • Icons: Tabler IconMicrophone (idle), IconPlayerStopFilled (stop), and the toolkit's five-bar IconVoiceChat (voice chat, from composer/voice-chat-icon). IconWaveSine reads as a heartbeat; never use it, a sparkle, or a robot icon for voice.
  • Errors via inline alert or toast, never window.alert.

Realtime speech mode

Realtime speech mode is a full-duplex OpenAI Realtime WebRTC session, separate from the dictation providers below. It prefers the authenticated user's complete Builder connection and the Builder-managed metered gateway. A scoped OPENAI_API_KEY is the fallback when Builder is not connected. The server owns the gpt-realtime-2.1 session configuration and keeps credentials out of browser code. Voice chat is offered only once one of them is configured.

  • Voice chat lives in the composer. While a session is on, the mic's slot holds a status pill (live bars from the microphone while you speak, muted bars from the assistant's audio while it speaks, and the session status) and speaker and microphone mute toggles, nothing else; the primary slot is an End voice chat X, never red, that spins while connecting or ending. Muting the microphone disables the WebRTC input track; muting the speaker mutes playback only. The editor locks behind a "Listening…" placeholder: the realtime session takes no typed input, so a typed draft would start a separate run the voice agent never hears. Errors use the composer's amber notice with Try again.
  • At silence the bars rest at their baseline; under reduced motion they stay still and fade with the level. When the session becomes live, the assistant gives one brief spoken greeting so readiness is unambiguous. Do not apply a text-sized max_output_tokens cap to that audio greeting because audio tokens can truncate it mid-sentence.
  • Voice device, language, intelligence and voice style live only in Settings › Account › Preferences › Voice chat (VoiceChatSettings), never in the composer. Those rows write the same preferences a session reads: application_state["realtime-voice-prefs"] and the browser-local microphone choice. A session re-reads them every time it starts, so a change applies to the next voice chat.
  • Semantic VAD keeps listening, starts responses automatically, and supports barge-in while the agent is speaking.
  • Function calls must cross
常见问题

听写和语音聊天是一回事吗?

不是。麦克风用于听写,而空草稿上的发送按钮会启动一个可选的实时语音会话。

语音设置保存在哪里?

每位用户的偏好保存为应用状态,来源选择器位于账户偏好中。

麦克风被阻止时应显示什么?

它会显示一条琥珀色提示,带有“重试”选项,并且仍可点击。

详情

作者的原始描述

Framework-wide voice dictation in the agent sidebar composer. Use when changing composer microphone UX, the transcribe-voice route, or the Voice Transcription settings section. Covers transcription-source routing, cleanup routing, Google realtime gating, and the voice transcription application-state keys.

repo: BuilderIO/agent-native

热度

GitHub 星标
7.6k
排名
#13190
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能