{"record":{"id":"85728f818173a83f","repo":"NousResearch/hermes-agent","slug":"getusermedia-unavailable-for-client-wake-capture","errorCode":null,"errorMessage":"getUserMedia unavailable for client wake capture","messagePattern":"getUserMedia unavailable for client wake capture","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/wake-client-capture.ts","lineNumber":95,"sourceCode":"\n  return btoa(binary)\n}\n\n/**\n * Start streaming the default microphone to `wake.feed`.\n * Returns a handle whose `stop()` ends tracks + audio graph.\n */\nexport async function startClientWakeCapture(options: ClientWakeCaptureOptions): Promise<ClientWakeCaptureHandle> {\n  const frameLength = Math.max(160, Math.trunc(options.frameLength || DEFAULT_FRAME))\n  const audioWindow = window as Window & { webkitAudioContext?: typeof AudioContext }\n  const AudioContextCtor = window.AudioContext || audioWindow.webkitAudioContext\n\n  if (!AudioContextCtor) {\n    throw new Error('AudioContext unavailable for client wake capture')\n  }\n\n  if (!navigator.mediaDevices?.getUserMedia) {\n    throw new Error('getUserMedia unavailable for client wake capture')\n  }\n\n  const stream = await navigator.mediaDevices.getUserMedia({\n    audio: {\n      channelCount: 1,\n      echoCancellation: true,\n      noiseSuppression: true,\n      autoGainControl: true\n    },\n    video: false\n  })\n\n  const context = new AudioContextCtor()\n  const source = context.createMediaStreamSource(stream)\n  // ScriptProcessor is deprecated but widely available and simple for PCM export.\n  // Buffer size 4096 keeps callback rate reasonable on desktop.\n  const processor = context.createScriptProcessor(4096, 1, 1)\n  const mute = context.createGain()","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/wake-client-capture.ts#L77-L113","documentation":"Error \"getUserMedia unavailable for client wake capture\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/wake-client-capture.ts:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a runtime that supports getUserMedia (desktop app or modern browser).","Serve the app over a secure context (https or localhost) so getUserMedia is exposed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}