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

add-read-aloud

하는 일

이 스킬은 어시스턴트가 기존 앱에 Grok 음성 합성을 추가하게 합니다. 앱이 답변을 말하거나 텍스트를 내레이션하기를 원하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓어시스턴트 답변을 소리 내어 읽어 주는 스피커 버튼을 원할 때.
  • ✓앱이 페이지나 프롬프트를 내레이션하기를 원할 때.
  • ✓텍스트에서 음성 오디오 파일을 만들어야 할 때.

스킬 링크

https://github.com/cursor/plugins/blob/main/grok-voice/skills/add-read-aloud/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-read-aloud/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 Read Aloud

Add Grok Text to Speech to an existing app: a speaker button on assistant replies, auto-speak, or narration of any text. Run on /add-read-aloud, typed Read aloud, or clear “speak this” / “TTS” intent. Cursor has no speaker; wire the app, not the IDE.

Docs

Pick the path

Need Path
Tap speaker, hear the finished reply. Narrate a page. Generate a file. Batch POST https://api.x.ai/v1/tts (default)
Audio starts while the LLM is still streaming; barge-in; texts over 15,000 chars Streaming wss://api.x.ai/v1/tts through a backend relay

Batch is the default for a read-aloud button: one request, one MP3, cacheable, the key never leaves the server. Go streaming only when the UX needs audio before the text is complete. POST /v1/tts has no documented streaming flag; do not invent one.

Auth

  • Bearer XAI_API_KEY, server side only. The TTS docs document no ephemeral-token flow, and browsers cannot set WebSocket headers, so browser streaming goes through your backend relay.
  • Never put the key in a client bundle. Do not paste keys in chat.

Steps

  1. Map the app

    • Where assistant messages render, where per-message actions live (copy, regenerate), how the reply stream ends, server framework, package manager.
    • The speaker icon belongs to read aloud. Waveform is voice mode (/add-voice), microphone is dictation (/add-dictation). Put a ghost speaker button in the message action row; loading shows a spinner, playing shows a stop square. One utterance at a time: starting a new one stops the current one.
    • Align the action row to the reply’s text edge, not the button’s box: an icon button centres its glyph, so if the assistant bubble has no padding pull the row left by that inset (e.g. -ml-[5px] for a 12–14 px icon in a 24 px button). Measure in the browser; getBoundingClientRect on the <p> and the <svg> should share a left edge.
    • Render the button only once the reply has finished streaming; on a live message it would speak a partial reply.
    • With many messages on screen, keep player state (active message id, loading | playing, last error) in one shared store (useSyncExternalStore, a signal, whatever the app uses) so every button reflects it and errors can surface in the app's existing status area. A per-button let current is not enough.
    • Auto-speak: opt-in toggle, off by default, and only after a user gesture on the page (autoplay policy). Never auto-speak on load.
    • If /add-voice is installed, its AudioContext and PCM player can play streaming TTS; do not add a second audio graph.
  2. Prepare the text

    • Speak prose, not markup. Strip markdown: headings → text, **bold** → text, links → link text, inline code → the code, fenced blocks → [pause] Code block omitted., tables → one sentence per row or omit. Keep punctuation; it drives pacing.
    • Neutralise speech tags that arrive inside the reply ([laugh], <whisper>…) so the model’s text cannot steer delivery. Strip only the documented tag names (list in step 5), not every bracket: [1] citations and [note] must survive.
    • Batch limit is 15,000 characters per request. Split longer text on paragraph, then sentence, then word boundaries and play the parts in order; fetch part N+1 while N plays or there is a silent gap at every boundary. Or use streaming.
    • Cache by hash(text + voice_id + language + speed); the same reply is often replayed.
  3. Batch path (default)

    • Server: your route takes { text, voice_id?, language? }, validates the shape of each (voice_id ^[a-z0-9-]{1,64}$, language BCP-47 or auto), forwards JSON, streams the body back with the upstream Content-Type and Cache-Control: no-store. Map upstream 404 to “unknown voice” so the client gets a readable error. Default output is MP3 at 24 kHz / 128 kbps, playable everywhere in the browser.
    • language: default to "auto" for a chat app, where replies follow the user’s language; pin "en" etc. only for fixed-language products.
// server (any runtime with fetch)
export async function speak(text: string, voice_id = "eve", l
자주 묻는 질문

API 키가 브라우저로 가나요?

아닙니다. 키는 서버에 남으며, 브라우저는 키를 전혀 갖지 않습니다.

기본 방식은 무엇인가요?

소리 내어 읽기 버튼에는 완성된 오디오 파일 하나를 돌려주는 일괄 요청이 기본입니다.

사용자 지정 음성도 다루나요?

스킬은 사용자 지정 음성에 관한 문서를 가리키므로, 그것은 스킬이 안내하는 선택지입니다.

상세 정보

작성자의 원본 설명

Use when the user runs /add-read-aloud or wants the app to speak text with Grok text-to-speech: read-aloud button on assistant replies, auto-speak, TTS, voice output, narration, IVR prompts, speech tags, voice_id. For a two-way voice agent use /add-voice. For speech-to-text use /add-dictation.

repo: cursor/plugins

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬