[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75TGG0N0HCTSBF6Z91FNA0X":3,"skill-same:01M75TGG0N0HCTSBF6Z91FNA0X":58},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":5,"forksCount":13,"repositoryHtmlUrl":24,"repositoryHomepageUrl":6,"ownerHtmlUrl":25,"ownerBlogUrl":26,"ownerDescription":6,"updatedAt":27,"install":28,"resources":41},"01M75TGG0N0HCTSBF6Z91FNA0X","sound-id",null,"ajohnsonnow\u002Fr1-warren","ajohnsonnow","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8867891?v=4","01M75T7TQ3B5VRHJF6X2Q7AWWW","Anthony Johnson","01M75T7TQPJG8YZTAVCH4SQW27",0,"MIT","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fsound-id\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"# SoundID — OpenClaw Skill Documentation\n\n**Skill name:** `sound-id`\n**Purpose:** Provides microphone access and audio analysis for the SoundID R1 Creation.\n\nThe R1 Creations sandbox has no direct microphone API. SoundID delegates all audio capture and optional pre-processing to this OpenClaw skill running on a paired computer. The Creation sends commands via the shared-storage bridge (`openclaw:cmd`), and this skill writes results back to `openclaw:resp`.\n\n---\n\n## Commands\n\n| Command | Params | Description |\n|---|---|---|\n| `record-start` | `durationSecs`, `category` | Start capturing audio; run optional pre-analysis |\n| `record-stop` | _(none)_ | Stop early and flush any buffered data |\n\n### `record-start`\n\nCaptures audio from the system microphone for `durationSecs` (default 10). When complete it writes an `audioDescription` string to the response that the Creation feeds into the R1 built-in LLM for final identification. For the `birds` category the skill may additionally query the MusicBrainz AcousticID API or a local species database before returning.\n\n**Params:**\n\n```json\n{\n  \"durationSecs\": 10,\n  \"category\": \"birds\"\n}\n```\n\n**Response written to `openclaw:resp`:**\n\n```json\n{\n  \"status\": \"done\",\n  \"ts\": 1718234567890,\n  \"data\": {\n    \"audioDescription\": \"Short melodic phrases with rising cadence, 2–3 note whistles, repeated every 1.5 seconds. Background: light urban ambient. No obvious mechanical noise.\",\n    \"durationCaptured\": 10,\n    \"category\": \"birds\"\n  }\n}\n```\n\nIf the skill cannot access a microphone, it returns `audioDescription: \"\"` — the Creation falls back to LLM-only mode using the category hint.\n\n### `record-stop`\n\nStops any active recording immediately. No response is written; the Creation handles cleanup on its side.\n\n---\n\n## Node.js Implementation\n\n```js\n\u002F**\n * sound-id\u002Fskill.js — OpenClaw skill for SoundID\n *\n * Requirements:\n *   npm install node-record-lpcm16 wav musicbrainz-api\n *\n * On macOS\u002FLinux: sox must be installed (brew install sox \u002F apt install sox).\n * On Windows: SoX for Windows or use the naudiodon alternative.\n *\u002F\n\nconst storage  = require(\"..\u002Fopenclaw-shared-storage\");\nconst recorder = require(\"node-record-lpcm16\");\nconst fs       = require(\"fs\");\nconst path     = require(\"path\");\nconst https    = require(\"https\");\nconst os       = require(\"os\");\n\nconst POLL_MS    = 400;\nconst CMD_KEY    = \"openclaw:cmd\";\nconst RESP_KEY   = \"openclaw:resp\";\nconst SKILL_NAME = \"sound-id\";\n\n\u002F\u002F Temporary audio file path\nconst TMP_WAV = path.join(os.tmpdir(), \"soundid-capture.wav\");\n\nlet activeRecording = null;\nlet pollTimer = null;\n\n\u002F\u002F ── POLL FOR COMMANDS ─────────────────────────────────────────────────────────\n\nfunction startPolling() {\n  pollTimer = setInterval(async () => {\n    try {\n      const raw  = await storage.get(CMD_KEY);\n      if (!raw) return;\n      const cmd  = JSON.parse(raw);\n      if (cmd.status !== \"pending\" || cmd.skill !== SKILL_NAME) return;\n\n      \u002F\u002F Mark as in-progress so we don't re-execute\n      await storage.set(CMD_KEY, JSON.stringify({ ...cmd, status: \"processing\" }));\n\n      if (cmd.command === \"record-start\") {\n        await handleRecordStart(cmd.params ?? {});\n      } else if (cmd.command === \"record-stop\") {\n        handleRecordStop();\n      }\n    } catch (err) {\n      console.error(\"[sound-id] poll error:\", err.message);\n    }\n  }, POLL_MS);\n}\n\n\u002F\u002F ── RECORD START ──────────────────────────────────────────────────────────────\n\nasync function handleRecordStart({ durationSecs = 10, category = \"unknown\" }) {\n  console.log(`[sound-id] Recording ${durationSecs}s — category: ${category}`);\n\n  \u002F\u002F Abort any existing recording\n  handleRecordStop();\n\n  try {\n    const audioData = await captureAudio(durationSecs);\n    const description = await describeAudio(audioData, category);\n\n    await writeResponse({\n      audioDescription: description,\n      durationCaptured: durationSecs,\n      category,\n    });\n  } catch (err) {\n    console.error(\"[sound-id] recording failed:\", err.message);\n    \u002F\u002F Write empty description — Creation will fall back to LLM-only\n    await writeResponse({\n      audioDescription: \"\",\n      durationCaptured: 0,\n      category,\n      error: err.message,\n    });\n  }\n}\n\nfunction handleRecordStop() {\n  if (activeRecording) {\n    try { activeRecording.stop(); } catch (_) {}\n    activeRecording = null;\n    console.log(\"[sound-id] recording stopped early\");\n  }\n}\n\n\u002F\u002F ── AUDIO CAPTURE ─────────────────────────────────────────────────────────────\n\nfunction captureAudio(durationSecs) {\n  return new Promise((resolve, reject) => {\n    const chunks = [];\n\n    const rec = recorder.record({\n      sampleRate:  16000,\n      channels:    1,\n      audioType:   \"wav\",\n      recorder:    \"sox\",   \u002F\u002F change to 'arecord' on Linux if sox unavailable\n    });\n\n    activeRecording = rec;\n\n    rec.stream().on(\"data\", chunk => chunks.push(chunk));\n    rec.stream().on(\"error\", reject);\n\n    setTimeout(() => {\n      try { rec.stop(); } catch (_) {}\n      activeRecording = null;\n      if (chunks.length === 0) {\n        reject(new Error(\"No audio data captured\"));\n        return;\n      }\n      resolve(Buffer.concat(chunks));\n    }, durationSecs * 1000);\n  });\n}\n\n\u002F\u002F ── AUDIO DESCRIPTION ─────────────────────────────────────────────────────────\n\u002F\u002F\n\u002F\u002F This function converts raw audio to a text description the R1 LLM can reason\n\u002F\u002F about. It uses a tiered approach:\n\u002F\u002F\n\u002F\u002F   Tier 1 — birds: query AcousticID \u002F MusicBrainz fingerprint API\n\u002F\u002F   Tier 2 — all:   basic heuristics from audio statistics (RMS, zero-crossing)\n\u002F\u002F   Tier 3 — all:   plain category hint (empty description)\n\nasync function describeAudio(audioBuffer, category) {\n  try {\n    if (category === \"birds\" || category === \"instruments\") {\n      const fingerprint = await getAcousticFingerprint(audioBuffer);\n      if (fingerprint) {\n        const match = await queryAcousticID(fingerprint);\n        if (match) return match;\n      }\n    }\n    return buildHeuristicDescription(audioBuffer, category);\n  } catch (_) {\n    return buildHeuristicDescription(audioBuffer, category);\n  }\n}\n\n\u002F\u002F Basic RMS + zero-crossing rate heuristic\nfunction buildHeuristicDescription(audioBuffer, category) {\n  \u002F\u002F Parse 16-bit PCM samples from WAV (skip 44-byte header)\n  const headerSize = 44;\n  if (audioBuffer.length \u003C= headerSize) return \"\";\n\n  const samples = [];\n  for (let i = headerSize; i \u003C audioBuffer.length - 1; i += 2) {\n    samples.push(audioBuffer.readInt16LE(i) \u002F 32768);\n  }\n\n  \u002F\u002F RMS (loudness)\n  const rms = Math.sqrt(samples.reduce((s, x) => s + x * x, 0) \u002F samples.length);\n\n  \u002F\u002F Zero-crossing rate (rough pitch indicator)\n  let zcr = 0;\n  for (let i = 1; i \u003C samples.length; i++) {\n    if ((samples[i] >= 0) !== (samples[i - 1] >= 0)) zcr++;\n  }\n  zcr = zcr \u002F samples.length;\n\n  const dbEstimate = rms > 0 ? Math.round(20 * Math.log10(rms) + 94) : 0;\n\n  const loudness = dbEstimate >= 85 ? \"loud (85+ dB)\"\n    : dbEstimate >= 70 ? \"moderate (70–85 dB)\"\n    : \"quiet (below 70 dB)\";\n\n  const pitch = zcr > 0.15 ? \"high-frequency content dominant\"\n    : zcr > 0.05 ? \"mid-frequency content\"\n    : \"low-frequency rumble\";\n\n  const rhythmic = detectRepetition(samples) ? \"with a rhythmic repeating pattern\" : \"non-repetitive\";\n\n  return `${loudness} audio sample, ${pitch}, ${rhythmic}. Category hint: ${category}. ` +\n    `Estimated sound pressure: ${dbEstimate} dB. Zero-crossing rate: ${zcr.toFixed(3)}.`;\n}\n\n\u002F\u002F Naive repetition detector: compare first-quarter against second-quarter\nfunction detectRepetition(samples) {\n  const q = Math.floor(samples.length \u002F 4);\n  if (q \u003C 100) return false;\n  let diff = 0;\n  for (let i = 0; i \u003C q; i++) {\n    diff += Math.abs(samples[i] - samples[q + i]);\n  }\n  return (diff \u002F q) \u003C 0.15;\n}\n\n\u002F\u002F ── ACOUSTICID FINGERPRINTING ─────────────────────────────────────────────────\n\u002F\u002F\n\u002F\u002F AcousticID is an open audio fingerprinting service. It is best for identifying\n\u002F\u002F music and known bird call recordings.  Sign up at https:\u002F\u002Facoustid.org\u002Flogin\n\u002F\u002F to get a free API key and set ACOUSTID_KEY in your environment.\n\nasync function getAcousticFingerprint(audioBuffer) {\n  const { execSync } = require(\"child_process\");\n  \u002F\u002F Write buffer to temp file for fpcalc\n  fs.writeFileSync(TMP_WAV, audioBuffer);\n  try {\n    const out = execSync(`fpcalc -json \"${TMP_WAV}\"`, { timeout: 8000 }).toString();\n    const parsed = JSON.parse(out);\n    return { duration: parsed.duration, fingerprint: parsed.fingerprint };\n  } catch (_) {\n    return null;\n  }\n}\n\nfunction queryAcousticID({ duration, fingerprint }) {\n  const key = process.env.ACOUSTID_KEY;\n  if (!key) return Promise.resolve(null);\n\n  return new Promise((resolve) => {\n    const params = new URLSearchParams({\n      client:      key,\n      duration:    Math.round(duration),\n      fingerprint: fingerprint,\n      meta:        \"recordings+releases\",\n    });\n\n    const req = https.get(\n      `https:\u002F\u002Fapi.acoustid.org\u002Fv2\u002Flookup?${params}`,\n      res => {\n        let body = \"\";\n        res.on(\"data\", d => (body += d));\n        res.on(\"end\", () => {\n          try {\n            const json = JSON.parse(body);\n            const result = json.results?.[0];\n            if (!result || result.score \u003C 0.7) { resolve(null); return; }\n            const rec = result.recordings?.[0];\n            if (!rec) { resolve(null); return; }\n            const title  = rec.title ?? \"Unknown\";\n            const artist = rec.artists?.[0]?.name ?? \"Unknown artist\";\n            resolve(`AcousticID match: \"${title}\" by ${artist}. Score: ${Math.round(result.score * 100)}%.`);\n          } catch (_) {\n            resolve(null);\n          }\n        });\n      }\n    );\n    req.on(\"error\", () => resolve(null));\n    req.setTimeout(6000, () => { req.destroy(); resolve(null); });\n  });\n}\n\n\u002F\u002F ── WRITE RESPONSE ────────────────────────────────────────────────────────────\n\nasync function writeResponse(data) {\n  const payload = {\n    status: \"done\",\n    ts:     Date.now(),\n    data,\n  };\n  await storage.set(RESP_KEY, JSON.stringify(payload));\n  console.log(\"[sound-id] response written:\", JSON.stringify(data).slice(0, 120));\n}\n\n\u002F\u002F ── SHARED STORAGE STUB ───────────────────────────────────────────────────────\n\u002F\u002F\n\u002F\u002F Replace with your actual OpenClaw shared-storage implementation.\n\u002F\u002F The real implementation writes to\u002Freads from the same key-value store that\n\u002F\u002F the R1 Creation accesses via window.creationStorage.plain.\n\n\u002F\u002F openclaw-shared-storage.js (minimal example — adapt to your setup):\n\u002F\u002F\n\u002F\u002F const store = {};\n\u002F\u002F module.exports = {\n\u002F\u002F   get: async (k)    => store[k] ?? null,\n\u002F\u002F   set: async (k, v) => { store[k] = v; },\n\u002F\u002F };\n\n\u002F\u002F ── ENTRY POINT ───────────────────────────────────────────────────────────────\n\nconsole.log(\"[sound-id] OpenClaw skill starting — polling for commands\");\nstartPolling();\n\nprocess.on(\"SIGINT\",  () => { handleRecordStop(); clearInterval(pollTimer); process.exit(0); });\nprocess.on(\"SIGTERM\", () => { handleRecordStop(); clearInterval(pollTimer); process.exit(0); });\n```\n\n---\n\n## Setup\n\n1. Install Node dependencies:\n   ```\n   npm install node-record-lpcm16 musicbrainz-api\n   ```\n\n2. Install SoX for audio capture:\n   - macOS: `brew install sox`\n   - Ubuntu\u002FDebian: `sudo apt install sox`\n   - Windows: [download SoX](https:\u002F\u002Fsourceforge.net\u002Fprojects\u002Fsox\u002F) and add to `PATH`\n\n3. (Optional) Install `fpcalc` (Chromaprint) for AcousticID fingerprinting:\n   - macOS: `brew install chromaprint`\n   - Ubuntu: `sudo apt install libchromaprint-tools`\n\n4. (Optional) Set `ACOUSTID_KEY` environment variable with your free AcousticID API key from https:\u002F\u002Facoustid.org\u002Flogin\n\n5. Run the skill:\n   ```\n   node skill.js\n   ```\n\n---\n\n## Architecture notes\n\n**Why text descriptions instead of audio file transfer?**\nThe OpenClaw bridge uses shared key-value storage (max ~64 KB per value). A raw 10-second WAV at 16 kHz mono is ~320 KB — too large. Instead, the skill extracts a compact text description (RMS, pitch indicators, AcousticID match if any) and sends that. The R1 LLM does the final identification reasoning from the description.\n\n**Bird Focus Mode**\nWhen `category === \"birds\"` the skill returns after each recording and the Creation automatically triggers the next `record-start` command 2 seconds later, creating a continuous scan loop. The loop runs until the user ends Bird Watch via PTT or long-press PTT.\n\n**Graceful offline degradation**\nIf this skill is not running, the Creation falls back to LLM-only mode with an empty `audioDescription`. The LLM uses the selected category as a hint and produces a realistic example identification at capped confidence (≤ 45%). The user sees a toast notification: \"OpenClaw unavailable — LLM only\".\n\n---\n\n## LED color reference\n\n| LED color | State |\n|---|---|\n| Blue `#378ADD` | Recording — actively capturing audio |\n| Amber `#EF9F27` | Analyzing — LLM processing |\n| Green `#639922` | Identified — high confidence (75%+) |\n| Amber `#EF9F27` | Identified — medium confidence (45–74%) |\n| Red `#E24B4A` | Identified — low confidence \u002F unidentified |\n| Teal `#1D9E75` | Bird Focus Mode active |\n| Off | Idle \u002F ready |\n",{},"main","734489c70f6293d3b800cd956559034acaa9f563","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren","https:\u002F\u002Fgithub.com\u002Fajohnsonnow","structuredforgrowth.com","2026-09-04 21:06:25",{"source":7,"skillName":5,"commands":29,"prompt":39,"zipAvailable":40},[30,33,36],{"tool":31,"command":32},"npx","npx skills add ajohnsonnow\u002Fr1-warren --skill sound-id",{"tool":34,"command":35},"bunx","bunx skills add ajohnsonnow\u002Fr1-warren --skill sound-id",{"tool":37,"command":38},"pnpm","pnpm dlx skills add ajohnsonnow\u002Fr1-warren --skill sound-id","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fsound-id\u002FSKILL.md",true,[42,48,52],{"path":43,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":46,"sourceHtmlUrl":47},"card.jpg","ASSET","资产文件",28081,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fsound-id\u002Fcard.jpg",{"path":49,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":50,"sourceHtmlUrl":51},"icon.png",8851,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fsound-id\u002Ficon.png",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"index.html","REFERENCE","参考文档",51928,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fsound-id\u002Findex.html",[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M75THZJQ1XYR8QDWB9RXC9QV","whisper-quiz","WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwhisper-quiz\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75THW5BJRSQQM3QP6M568FT","walk-cast","Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters \u002F Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwalk-cast\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M75THTANZTS2AMDDBP615RTA","voice-novel","Local machine skill for VoiceNovel — handles story export to disk.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-novel\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M75THQ175ZRJ3E0GPFW7QKM8","voice-guide","Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people\u002Fvehicles\u002Ffood\u002Fhazards\u002Fexits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-guide\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M75THKAJR69WV7QQYJ26X95C","voice-draft","Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-draft\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M75THGKGY2JY59MM9PREXCXX","voice-commit","Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git\u002FCI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-commit\u002FSKILL.md",[],[]]