add-dictation
ما الذي تفعله
تتيح للمساعد أن يضيف تحويل الكلام إلى نص من Grok إلى تطبيق قائم. وهي للمطورين الذين يريدون أن يملي المستخدمون نصاً أو يحصلوا على نصوص لتسجيلات.
متى تستخدمها
- ✓عندما تريد زر ميكروفون يكتب ما يقوله المستخدم في مربع نص.
- ✓عندما تحتاج إلى تسميات حية أو تفريغ نصي لملفات صوتية مسجّلة.
- ✓عندما تريد تفريغ ملفات مرفوعة أو روابط مع الطوابع الزمنية.
رابط المهارة
https://github.com/cursor/plugins/blob/main/grok-voice/skills/add-dictation/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أضف زر ميكروفون إلى تطبيق الدردشة لدينا يحوّل الكلام إلى نص في مربع الرسالة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يقرأ المساعد دليل نموذج تحويل الكلام إلى نص الحالي، ثم يربط طلب دفعة (batch) للإملاء البسيط، أو اتصالاً متدفقاً عبر خادمك عندما يجب أن يظهر النص أثناء الكلام. ويبقى مفتاح API على الخادم.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Add Dictation
Add Grok Speech to Text to an existing app: a mic button that dictates into the composer, live captions, or transcripts of recorded audio. Run on /add-dictation, typed Dictate, or clear “transcribe” intent. Cursor has no mic; wire the app, not the IDE.
Docs
- https://docs.x.ai/developers/model-capabilities/audio/speech-to-text
- Model selection (read first): https://docs.x.ai/developers/model-capabilities/audio/speech-to-text#model-selection
- Pricing (cite docs only): https://docs.x.ai/developers/pricing
Model
Before any STT call, read the model-selection section and pass the latest listed model as model. Do not invent ids or reuse a stale one from this skill. REST: form field before file. Streaming: query param. Official examples currently send grok-voice-transcribe-2.0. Listed today: grok-voice-transcribe-2.0 (best), grok-voice-transcribe-1.0 (original; API default when model is omitted).
Pick the path
| Need | Path |
|---|---|
| Tap, speak, tap, text appears. Uploaded files. URLs. | Batch POST https://api.x.ai/v1/stt (default) |
| Text appears while speaking: captions, long dictation, push-to-talk | Streaming wss://api.x.ai/v1/stt through a backend relay |
Batch is the default for a composer mic button: one request, no socket, the key never leaves the server. Go streaming only when the UX needs interim text.
Auth
- Bearer
XAI_API_KEY, server side only. The STT docs document no ephemeral-token flow, and browsers cannot set WebSocket headers, so browser streaming goes through your backend relay. Do not invent a token flow. - Never put the key in a client bundle. Do not paste keys in chat.
Steps
Map the app
- Composer or input component, where the text should land (insert at cursor vs replace), server framework, package manager.
- The microphone icon belongs to dictation. If
/add-voiceis installed, its waveform primary button stays as is; add the mic as a secondary ghost button beside it. - Existing mic capture? If
/add-voiceran, its PCM capture can feed streaming STT; pass its rate assample_rate. 16 kHz is the model’s native rate; other supported rates (8000, 16000, 22050, 24000, 44100, 48000) are resampled server side.
Batch path (default)
- Client:
MediaRecorder→Blob→POSTto your own route. The endpoint auto-detects containers (WAV, MP3, OGG, Opus, FLAC, AAC, MP4, M4A, MKV, WebM), so send whateverMediaRecorderproduces. - Server: forward as
multipart/form-data. Option fields first,filelast; fields afterfilemay be ignored.fileorurl, max 500 MB.modelfrom docs (latest listed).
- Client:
// server (any runtime with fetch + FormData)
export async function transcribe(blob: Blob, filename: string) {
const form = new FormData();
form.append("model", "grok-voice-transcribe-2.0"); // latest from docs; re-read model-selection
form.append("format", "true"); // written-form numbers/currency; requires language
form.append("language", "en");
// form.append("keyterm", "Acme"); // repeat per term, ≤100 terms × 50 chars
form.append("file", blob, filename); // last
const res = await fetch("https://api.x.ai/v1/stt", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.XAI_API_KEY}` },
body: form,
});
if (!res.ok) throw new Error(`STT ${res.status}`); // 400 bad input, 413 >500 MB, 429 back off, 502 url fetch failed, 503 retry
return (await res.json()) as {
text: string; language: string; duration: number;
words?: { text: string; start: number; end: number; speaker?: number }[];
channels?: { index: number; text: string; words: unknown[] }[];
};
}
// client
const mime = MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : "audio/mp4";
const rec = new MediaRecorder(stream, { mimeType: mime });
const parts: BlobPart[] = [];
rec.ondataavailable = (e) => parts.push(e.data);
rec.onstop = async () => {
const fd = new FormData();
fd.append("file", new Blob(parts, { type: mime }), "dictation");
const { text } = await (await fetch("/api/dictation", { method: "POST", body: fd })).json();
insertAtCursor(text);
};
rec.start(); // second tap: rec.stop()
- Streaming path
- Relay: server holds the key, upgrades the browser socket, forwards binary frames and client control messages up, JSON events down. Build the query string server side.
modelfrom docs (latest
- Relay: server holds the key, upgrades the browser socket, forwards binary frames and client control messages up, JSON events down. Build the query string server side.
الأسئلة الشائعة
أين يُحفظ مفتاح API؟
على الخادم فقط. تقول المهارة إن المفتاح لا يغادر الخادم أبداً.
ما الخيار الافتراضي؟
طلبات الدفعة، التي ترسل تسجيلاً واحداً وتحصل على نص واحد، هي الافتراضي لزر الميكروفون.
متى يُستخدم البث المتدفق؟
للنص الذي يجب أن يظهر أثناء كلام الشخص، مثل التسميات الحية.
التفاصيل
الوصف الأصلي من المؤلف
Use when the user runs /add-dictation or wants speech turned into text with Grok speech-to-text: a mic button that dictates into the composer, live captions, or transcribing recorded audio (files, uploads, URLs) with word timestamps, diarization, subtitles, meeting notes. STT, transcribe, transcription. For a voice agent that talks back use /add-voice.
repo: cursor/plugins
الشعبية
- نجوم GitHub
- 15k
- الترتيب
- #10950
- الترخيص
- —
- آخر تحديث
- 31/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
advisor
15kيتيح لوكيلك استشارة نموذج ثانٍ أقوى عند نقاط مفصلية، مثل قبل قرار كبير أو عند تعثره في خطأ، إذا فعّلت ذلك.
check-agent-compatibility
15kيُجري فحصاً شاملاً لمدى قدرة وكلاء البرمجة بالذكاء الاصطناعي على تشغيل المستودع والتحقق منه وتوثيقه، ويعيد درجة توافق واحدة مع أهم المشكلات.
cli-for-agents
15kيعلّم وكيلك تصميم أدوات سطر الأوامر أو مراجعتها، حتى يستطيع وكلاء الذكاء الاصطناعي تشغيلها دون مطالبات، مع نصوص مساعدة واضحة وأمثلة.
continual-learning
15kيحافظ على ملاحظاتك في AGENTS.md محدّثة، بتسليم مهمة مراجعة المحادثات السابقة إلى مُحدِّث ذاكرة مخصص.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.