본문으로 건너뛰기
Skillpedia
에이전트15k · #10952

add-voice

하는 일

이 스킬은 기존 앱에 실시간 음성 대화를 추가하게 합니다. 마이크가 음성을 보내고 음성 답변이 돌아옵니다. 음성 어시스턴트를 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓사용자가 실시간으로 AI와 음성으로 대화하기를 원할 때.
  • ✓앱이 음성 텍스트 변환, 언어 모델, 음성 합성 단계를 따로 연결해서 하나의 음성 루프로 바꿀 수 있을 때.
  • ✓안전한 인증을 갖춘 음성 모드 버튼을 앱에 두고 싶을 때.

스킬 링크

https://github.com/cursor/plugins/blob/main/grok-voice/skills/add-voice/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/cursor/plugins/blob/main/grok-voice/skills/add-voice/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 앱에 음성 모드를 추가해서, 사용자가 어시스턴트와 말하고 실시간으로 답을 들을 수 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

어시스턴트는 앱을 파악하고, 백엔드나 임시 토큰을 통해 안전한 접근을 설정한 뒤, 마이크를 음성을 입력하고 출력하는 실시간 음성 연결에 연결합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Add Voice

Add Grok Speech to Speech to an existing app. Run on /add-voice, typed Voice Mode, or clear “add Grok voice” intent.

Goal

Working duplex path: user-app mic in, audio out, wss://api.x.ai/v1/realtime?model=grok-voice-latest, safe auth. Cursor has no native mic; wire the app (or a sample client), not the IDE.

Protocol first

Language-agnostic event loop. TypeScript samples default. Short Python twins only where the client API differs (e.g. ws vs websockets).

Docs

Steps

  1. Map the app

    • Stack: none, OpenAI Realtime, STT→LLM→TTS cascade, TTS/STT only.
    • Client: web / Node / iOS / Android / server.
    • If a cascade or OpenAI Realtime exists: replace it with the single duplex loop below (URL, model, voice, event diffs); keep standalone /v1/stt or /v1/tts only if the product still needs one-shot listen or speak outside the agent.
  2. Auth

    • Server: Bearer XAI_API_KEY.
    • Browser/mobile: backend POST https://api.x.ai/v1/realtime/client_secrets, client uses ephemeral token (Bearer or browser sec-websocket-protocol: xai-client-secret.<token>).
    • Never put a long-lived key in client bundles. Do not paste keys in chat.
  3. Connect + session

    • URL: wss://api.x.ai/v1/realtime?model=grok-voice-latest
    • On open: session.update with voice (default eve), instructions, turn_detection: { type: "server_vad" } (or null for push-to-talk), PCM 24 kHz unless the app already standardizes elsewhere.
    • Set audio.input.transcription.model: "grok-transcribe" or no user transcript arrives (conversation.item.input_audio_transcription.updated is cumulative, not a delta).
    • Tools if needed: web_search, x_search, file_search, mcp, custom function.
  4. Audio I/O (app-side)

    • One AudioContext per session for capture and playback, created inside the user gesture (autoplay policy). Ask for 24 kHz; if the browser gives another rate, resample before sending.
    • Mic → AudioWorklet in ~100 ms chunks → input_audio_buffer.append (or binary transport). Start WS and mic in parallel; buffer early audio, flush on open.
    • Play response.output_audio.delta immediately; schedule with a ~150 ms lead so chunks butt together. On input_audio_buffer.speech_started, stop everything queued (barge-in).
    • Transcript rows: create the user row on input_audio_buffer.committed (item_id), fill it on …transcription.updated; assistant text from response.output_audio_transcript.delta / .done, close the turn on response.done.
    • On function tools: function_call_output, finish playback, then response.create.
  5. Composer UI convention

    • One primary button, right side of the composer. Empty composer → waveform icon (stroked, e.g. Phosphor WaveformIcon weight="bold"; never the fill weight, which renders as a blob at 16 px), starts voice mode. Any text present → classic send arrow; in voice mode that text goes into the live session (conversation.item.create + response.create). Text reply streaming → stop square.
    • While voice is live the same button shows an animated waveform (4 bars, ~3 px wide, 2 px gap, ~16 px tall, min scale 0.4 so they stay legible in a 28 px button) and ends the session on click. Phase drives the animation: listening slow, speaking fast, connecting/thinking slower and slightly dimmed (opacity ≥ 0.75). Honor prefers-reduced-motion. No X button, no pulsing ring.
    • Status lives in the composer, not around it: the placeholder reads Connecting… / Listening… / Thinking… / Speaking…, plus an sr-only role="status". No separate status row.
    • The microphone icon is reserved for dictation (/add-dictation). Never use it for voice mode.
  6. TS skeleton (default)

const url = "wss://api.x.ai/v1/realtime?model=grok-voice-latest";
// Node: pass Authorization header. Browser: use xai-client-secret.<token> protocol.
const ws = new WebSocket(url /* , { headers: { Authorization: `Bearer ${token}` } } */);

ws.addEventListener("open", () => {
  ws.send(JSON.stringify({
    type: "session.update",
    session: {
      voice: "eve",
      instructions: "You are a helpful voice agent.",
     
자주 묻는 질문

API 키는 안전하게 보관되나요?

네. 브라우저와 모바일 앱은 주 키 대신 백엔드에서 받은 임시 토큰을 씁니다.

기존 설정을 대체하나요?

앱이 음성 텍스트 변환, 언어 모델, 음성 합성을 따로 쓴다면, 이 스킬은 그것을 하나의 음성 루프로 바꿀 수 있습니다.

마이크는 어디에서 처리되나요?

앱에서 처리됩니다. 코딩 도구 자체에는 마이크가 없기 때문입니다.

상세 정보

작성자의 원본 설명

Use when the user runs /add-voice, types Voice Mode, or asks to add Grok realtime voice to an app, including replacing an STT-LLM-TTS cascade or OpenAI Realtime. Wire speech-to-speech, safe auth, and app mic. Composer: waveform button, mic icon reserved for dictation. For mic-to-text only use /add-dictation; to speak text replies use /add-read-aloud. To add debug logging and fix from logs use /debug-voice.

repo: cursor/plugins

인기도

GitHub 스타
15k
순위
#10952
라이선스
—
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬