A synchronous dedicated voice activity detection stream. Supply a VAD Multi Speaker or VAD Voice Focus model. Each instance keeps separate signal state and retains the model weights.
Releases the owned WebAssembly allocation. Call once in finally and do not use the handle afterward. Garbage collection does not guarantee timely cleanup; free() does not acknowledge session termination.
Returns a newly owned handle to shared prediction and control state. The handle does not contain a separate VAD model. Repeated calls require separate free() calls for the returned contexts.
Renamed in 0.25.0. This method was getVadContext() through 0.23.0.
All three arguments are required. sample_rate is a whole-number rate in Hz from 8,000 through 192,000; block_size is a positive whole-number count of mono samples, not bytes. Prefer the model’s optimal sample rate and block size. Unsupported block configurations throw. Pass false for fixed blocks of exactly block_size samples or true to permit shorter blocks up to that maximum. Variable blocks can add buffering delay. Initialization allocates memory and resets signal state. A failed initialization leaves processing uninitialized; correct the configuration before submitting audio again.
Creates a dedicated VAD stream using a live VAD model and the credential in license_key. Use a short-lived JWT from your backend in browser code. Enhancement and analysis models are rejected. Construction can throw for model type, model creation or credential errors. Initialize the audio format before processing. No OpenTelemetry configuration argument is exposed.
Processes one block of normalized mono Float32Array samples without changing the caller’s array. Samples are copied into WebAssembly memory and into the VAD’s processing buffer. Returns void; read the prediction through the context afterward. Requires successful initialization and the configured block length. Throws for uninitialized or mismatched audio, disallowed processing or runtime failures.
Requests termination of the telemetry session. Stop submitting audio before calling this method. Processing becomes disallowed once the telemetry task handles the signal; the void return is not an acknowledgment of server delivery or immediate completion. This method neither flushes delayed audio nor frees the object. Call free() separately when finished.
A shared prediction and control handle returned by Vad.getContext. Its constructor is private. Each returned handle must be freed separately. Freeing it does not free its VAD. A surviving context retains state after the VAD is freed, but cannot produce new predictions.
Releases the owned WebAssembly allocation. Call once in finally and do not use the handle afterward. Garbage collection does not guarantee timely cleanup; free() does not acknowledge session termination.
Returns the stored floating-point value for the selected VadParameter. Duration values are in seconds. Effective timing follows model frame boundaries; do not interpret the getter as a measurement of the resulting delay.
Returns end-to-end prediction delay in samples at the initialized host sample rate, including input block adaptation. Query after initialization. Divide by sample rate for seconds.
Returns the latest raw speech probability as a number from 0 through 1, before the hold and minimum-duration decision logic. A fresh or reset context reads 0 until new predictions are available.
Returns the latest speech decision after sensitivity and duration logic. A fresh or reset context reads false until processing provides a new decision.
Immediately clears the published speech decision and raw probability, and requests clearing of the underlying signal history on the next processing pass. Preserves the initialized format and configured parameters.
Sets the parameter for subsequent processing. Invalid ranges, infinities and NaN throw RangeError. Defaults come from the loaded model, so query them rather than assuming a universal preset. See VadParameter below for units and ranges.
Replaces the bearer token for subsequent session requests without creating a new processing instance. Both the original credential and the replacement must be JWT-form credentials. A malformed or unsupported replacement throws and leaves the previous credential in place. Local format acceptance does not prove that the backend accepts the new token. Obtain fresh short-lived tokens through your backend; keep the SDK key on the server. This call returns void, not a network-completion promise.
An energy VAD handle returned by Processor.getEnergyVadContext. Its constructor is private. Detection uses the enhanced signal before output mixing and runs no separate model, so an enhancement model yields speech decisions without loading a dedicated VAD model. Detection advances with Processor.process.Every handle from one processor refers to the same energy VAD, and each must be freed separately. Freeing a handle does not free the processor or disable detection. A surviving handle stays usable after the processor is freed, but produces no new predictions.Sensitivity uses the energy range, 1 through 15, not the 0 through 1 probability threshold of a dedicated VAD model. See VadParameter.Sensitivity.
Returns the energy VAD’s prediction. It is false before audio is processed and after a reset, and lags its input by getPredictionDelay() samples. Speech hold and minimum speech duration affect its timing further. The prediction stops updating if the backing processor stops being processed.
Modifies an energy VAD parameter. Sensitivity uses the energy range, 1 through 15. A value outside the valid range throws a RangeError. All parameters can be changed during processing.
Returns the prediction delay in samples, covering input reblocking, STFT and enhancement model processing. It equals ProcessorContext.getAudioDelay for the backing processor; energy detection does not delay the audio. Speech hold and minimum speech duration affect decision timing and are not included.Before initialization the value uses the processor’s optimal block size at its native sample rate. After initialization it is expressed in samples at the rate given to Processor.initialize and includes input-buffering latency for the configured block size, which a non-optimal or variable block size increases.
Clears the energy VAD state, including the published speech decision. Use it when the stream is interrupted or when seeking. Configured parameters are retained and the backing processor is not reset; ProcessorContext.reset also resets the energy VAD.
Controls recent-speech hold behavior in seconds. Range: 0 through the model’s maximum supported hold duration. When the current probability is at or below the threshold, the decision uses the positive-frame count in the recent lookback window. Above the threshold, the consecutive-frame rule from MinimumSpeechDuration applies. Effective timing follows frame boundaries.
Its meaning depends on the detector. On a VadContext, a speech-decision probability threshold from 0 through 1, where lower values classify more frames as speech. On an EnergyVadContext, the energy threshold of the enhanced signal, computed as 10 ** -sensitivity over 1 through 15, where higher values detect quieter speech.
This helper assumes the module is initialized, model is a live dedicated VAD model, token is a backend-issued JWT and audio contains one optimal mono block. A single initial block can precede a usable prediction because of model delay and duration settings. Keep a VAD instance alive across the full stream in an integration.
import { Vad } from "@ai-coustics/aic-sdk-wasm";/** * @param {import("@ai-coustics/aic-sdk-wasm").Model} model * @param {string} token * @param {Float32Array} audio */export function detectBlock(model, token, audio) { const sampleRate = model.getOptimalSampleRate(); const blockSize = model.getOptimalBlockSize(sampleRate); if (audio.length !== blockSize) throw new Error("Expected one optimal block"); const vad = new Vad(model, token); try { vad.initialize(sampleRate, blockSize, false); const context = vad.getContext(); try { vad.process(audio); return { speech: context.isSpeechDetected(), probability: context.getRawVadProbability(), delaySamples: context.getPredictionDelay(), }; } finally { context.free(); } } finally { try { vad.terminateSession(); } finally { vad.free(); } }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ai-coustics Docs","description":"Integrate and operate ai-coustics audio models in your application.","colors":{"primary":"#006FFF","light":"#6993FF","dark":"#006FFF"},"logo":{"light":"https://mintcdn.com/ai-coustics/TRQ6cYSvxBnlqNAk/logo/light.svg?fit=max\u0026auto=format\u0026n=TRQ6cYSvxBnlqNAk\u0026q=85\u0026s=811a7351a129b8c16831882725fa1e9f","dark":"https://mintcdn.com/ai-coustics/TRQ6cYSvxBnlqNAk/logo/dark.svg?fit=max\u0026auto=format\u0026n=TRQ6cYSvxBnlqNAk\u0026q=85\u0026s=0ed4b1ebfd381ef8674fcc5aba00e414"},"favicon":{"light":"https://mintcdn.com/ai-coustics/TRQ6cYSvxBnlqNAk/logo/favicon-light.svg?fit=max\u0026auto=format\u0026n=TRQ6cYSvxBnlqNAk\u0026q=85\u0026s=59bbb7bd1ad6425827271c3cb866b4af","dark":"https://mintcdn.com/ai-coustics/TRQ6cYSvxBnlqNAk/logo/favicon-dark.svg?fit=max\u0026auto=format\u0026n=TRQ6cYSvxBnlqNAk\u0026q=85\u0026s=89d8a383bd7a7ee3b718157ae00da595"},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#F9F9F9","dark":"#0F0F0F"}},"navbar":{"links":[{"href":"https://discord.gg/wrSthtNqQ4","label":"Discord"}],"primary":{"type":"button","label":"Dashboard","href":"https://developers.ai-coustics.com"}},"footer":{"socials":{"github":"https://github.com/ai-coustics","linkedin":"https://linkedin.com/company/ai-coustics","discord":"https://discord.gg/wrSthtNqQ4"},"links":[{"items":[{"label":"Artifacts","href":"https://artifacts.ai-coustics.io/"},{"label":"Blog","href":"https://ai-coustics.com/blog"},{"label":"Contact","href":"https://ai-coustics.com/contact"},{"label":"Support","href":"https://discord.gg/wrSthtNqQ4"}]},{"items":[{"label":"Privacy Policy","href":"https://ai-coustics.com/legal/privacy-policy"},{"label":"Legal Notice","href":"https://ai-coustics.com/legal/legal-notice"}]}]},"fonts":{"family":"Milling Duplex","source":"https://marketing.ai-coustics.com/asset-nr111222","format":"woff2"},"integrations":{"posthog":{"apiKey":"phc_jUyY7eTktQfc09C1NsINHKUOFptORtA3GXQwmWQCxwv","apiHost":"https://phdata.ai-coustics.com","sessionRecording":true}},"banner":{"content":"Core SDK 0.26.0 uses model file version 8 and renamed Quail, Rook and VAD model IDs such as `quail-l-16khz`. [Update your model IDs](/models/older-models/model-naming-changes#model-file-version-8-use-the-new-ids).","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"variables":{"CoreSdkVersion":"0.26.0","CPackageVersion":"0.26.0","CppPackageVersion":"0.26.0","NodePackageVersion":"0.26.0","WasmPackageVersion":"0.26.0","RustCrateVersion":"0.25.2","RustSysCrateVersion":"0.25.2","LiveKitExtrasVersion":"0.26.0","PythonPackageVersion":"3.4.0","PipecatFrameworkPackageVersion":"1.15.0","PipecatPythonPackageVersion":"3.3.2","PipecatCoreSdkVersion":"0.25.2","CppCoreSdkVersion":"0.26.0","NodeCoreSdkVersion":"0.26.0","WasmCoreSdkVersion":"0.26.0","RustCoreSdkVersion":"0.25.2","PythonCoreSdkVersion":"0.26.0","LiveKitExtrasCoreSdkVersion":"0.26.0","LiveKitPythonPackageVersion":"3.4.0","LiveKitNodePackageVersion":"0.26.0"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ai-coustics","hasAudioNarration":false,"actualSubdomain":"ai-coustics","customDomains":["docs.ai-coustics.com"],"gitSource":{"type":"github","owner":"ai-coustics","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae86e7b06138f92515d8588","collectionId":"b4a3f6bf-d57f-4a86-892f-7792782126f0","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae86e7b06138f92515d8588"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aedde2cb961f3bf48d4c9aa","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Reference","count":47},{"language":"default","tag":"API reference","count":37},{"language":"default","tag":"Guides","count":15},{"language":"default","tag":"Models","count":14},{"language":"default","tag":"Get started","count":13},{"language":"default","tag":"WebAssembly","count":7},{"language":"default","tag":"C","count":6},{"language":"default","tag":"C++","count":6},{"language":"default","tag":"Node.js","count":6},{"language":"default","tag":"Python","count":6}]},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":true,"enableAskAiSearchBar":false,"deflection":{"enabled":true,"email":"support@ai-coustics.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"69860095cf6bd26bac483cd9","deploymentId":"68beef77fe02728a34d52964","questionText":"How to generate an SDK key?","status":"active","generatedBy":"manual","createdAt":"2026-02-06T14:54:13.180Z","updatedAt":"2026-02-06T14:54:13.180Z","__v":0},{"_id":"69860087cf6bd26bac483cc6","deploymentId":"68beef77fe02728a34d52964","questionText":"Which model is the best for my integration?","status":"active","generatedBy":"manual","createdAt":"2026-02-06T14:53:59.865Z","updatedAt":"2026-02-06T14:53:59.865Z","__v":0},{"_id":"69860078cf6bd26bac483c9e","deploymentId":"68beef77fe02728a34d52964","questionText":"How to get started with the SDK?","status":"active","generatedBy":"manual","createdAt":"2026-02-06T14:53:44.411Z","updatedAt":"2026-02-06T14:53:44.411Z","__v":0}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"sidebar-nav-group-divider{display:block;height:0;margin:0.85rem 0;border-top:1px solid #DEDEDE}.dark sidebar-nav-group-divider{border-top-color:#333333}.nav-tabs-item img[aria-hidden=\"true\"]{filter:none}.dark .nav-tabs-item img[aria-hidden=\"true\"]{filter:invert(1)}#content :is(a,span)[id]:empty{scroll-margin-top:var(--scroll-mt, 10rem)}"}],"page":{"pagePath":"reference/sdk/api/wasm/vad","slug":"/reference/sdk/api/wasm/vad","pageMetadata":{"title":"WebAssembly VAD API","description":"Process dedicated VAD models and read speech predictions.","href":"/reference/sdk/api/wasm/vad"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Process dedicated VAD models and read speech predictions.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Version:`}),` `,_jsx(_components.code,{children:`@ai-coustics/aic-sdk-wasm`}),` 0.26.0, Core SDK 0.26.0. `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/index`,children:`API index`}),` · `,_jsx(_components.a,{href:`/reference/sdk/language-bindings/wasm`,children:`WebAssembly quickstart`}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-vad`}),`\n`,_jsx(Heading,{level:`2`,id:`vad`,children:_jsx(_components.code,{children:`Vad`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Vad`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A synchronous dedicated voice activity detection stream. Supply a VAD Multi Speaker or VAD Voice Focus model. Each instance keeps separate signal state and retains the model weights.`}),`\n`,_jsx(`span`,{id:`wasm-vad-free`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-free`,children:_jsx(_components.code,{children:`Vad.free`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`free`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Releases the owned WebAssembly allocation. Call once in `,_jsx(_components.code,{children:`finally`}),` and do not use the handle afterward. Garbage collection does not guarantee timely cleanup; `,_jsx(_components.code,{children:`free()`}),` does not acknowledge session termination.`]}),`\n`,_jsx(`span`,{id:`wasm-vad-symbol-dispose`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-symbol-dispose`,children:_jsx(_components.code,{children:`Vad.Symbol.dispose`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Symbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dispose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Aliases `,_jsx(_components.code,{children:`free()`}),` when the runtime supports `,_jsx(_components.code,{children:`Symbol.dispose`}),`; do not call both on the same handle. Otherwise, call `,_jsx(_components.code,{children:`free()`}),` in `,_jsx(_components.code,{children:`finally`}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-vad-getcontext`}),`\n`,_jsx(`span`,{id:`wasm-vad-getvadcontext`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-getcontext`,children:_jsx(_components.code,{children:`Vad.getContext`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VadContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns a newly owned handle to shared prediction and control state. The handle does not contain a separate VAD model. Repeated calls require separate `,_jsx(_components.code,{children:`free()`}),` calls for the returned contexts.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Renamed in 0.25.0. This method was `,_jsx(_components.code,{children:`getVadContext()`}),` through 0.23.0.`]})}),`\n`,_jsx(`span`,{id:`wasm-vad-initialize`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-initialize`,children:_jsx(_components.code,{children:`Vad.initialize`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sample_rate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`block_size`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`variable_block_size`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`All three arguments are required. `,_jsx(_components.code,{children:`sample_rate`}),` is a whole-number rate in Hz from 8,000 through 192,000; `,_jsx(_components.code,{children:`block_size`}),` is a positive whole-number count of mono samples, not bytes. Prefer the model’s optimal sample rate and block size. Unsupported block configurations throw. Pass `,_jsx(_components.code,{children:`false`}),` for fixed blocks of exactly `,_jsx(_components.code,{children:`block_size`}),` samples or `,_jsx(_components.code,{children:`true`}),` to permit shorter blocks up to that maximum. Variable blocks can add buffering delay. Initialization allocates memory and resets signal state. A failed initialization leaves processing uninitialized; correct the configuration before submitting audio again.`]}),`\n`,_jsx(`span`,{id:`wasm-vad-constructor`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-constructor`,children:_jsx(_components.code,{children:`Vad.constructor`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`constructor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`license_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Creates a dedicated VAD stream using a live VAD `,_jsx(_components.code,{children:`model`}),` and the credential in `,_jsx(_components.code,{children:`license_key`}),`. Use a short-lived JWT from your backend in browser code. Enhancement and analysis models are rejected. Construction can throw for model type, model creation or credential errors. Initialize the audio format before processing. No OpenTelemetry configuration argument is exposed.`]}),`\n`,_jsx(`span`,{id:`wasm-vad-process`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-process`,children:_jsx(_components.code,{children:`Vad.process`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`audio`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Float32Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Processes one block of normalized mono `,_jsx(_components.code,{children:`Float32Array`}),` samples without changing the caller’s array. Samples are copied into WebAssembly memory and into the VAD’s processing buffer. Returns `,_jsx(_components.code,{children:`void`}),`; read the prediction through the context afterward. Requires successful initialization and the configured block length. Throws for uninitialized or mismatched audio, disallowed processing or runtime failures.`]}),`\n`,_jsx(`span`,{id:`wasm-vad-terminatesession`}),`\n`,_jsx(Heading,{level:`3`,id:`vad-terminatesession`,children:_jsx(_components.code,{children:`Vad.terminateSession`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`terminateSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Requests termination of the telemetry session. Stop submitting audio before calling this method. Processing becomes disallowed once the telemetry task handles the signal; the `,_jsx(_components.code,{children:`void`}),` return is not an acknowledgment of server delivery or immediate completion. This method neither flushes delayed audio nor frees the object. Call `,_jsx(_components.code,{children:`free()`}),` separately when finished.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext`}),`\n`,_jsx(Heading,{level:`2`,id:`vadcontext`,children:_jsx(_components.code,{children:`VadContext`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` VadContext`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A shared prediction and control handle returned by `,_jsx(_components.code,{children:`Vad.getContext`}),`. Its constructor is private. Each returned handle must be freed separately. Freeing it does not free its VAD. A surviving context retains state after the VAD is freed, but cannot produce new predictions.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-free`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-free`,children:_jsx(_components.code,{children:`VadContext.free`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`free`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Releases the owned WebAssembly allocation. Call once in `,_jsx(_components.code,{children:`finally`}),` and do not use the handle afterward. Garbage collection does not guarantee timely cleanup; `,_jsx(_components.code,{children:`free()`}),` does not acknowledge session termination.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-symbol-dispose`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-symbol-dispose`,children:_jsx(_components.code,{children:`VadContext.Symbol.dispose`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Symbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dispose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Aliases `,_jsx(_components.code,{children:`free()`}),` when the runtime supports `,_jsx(_components.code,{children:`Symbol.dispose`}),`; do not call both on the same handle. Otherwise, call `,_jsx(_components.code,{children:`free()`}),` in `,_jsx(_components.code,{children:`finally`}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-getparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-getparameter`,children:_jsx(_components.code,{children:`VadContext.getParameter`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VadParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns the stored floating-point value for the selected `,_jsx(_components.code,{children:`VadParameter`}),`. Duration values are in seconds. Effective timing follows model frame boundaries; do not interpret the getter as a measurement of the resulting delay.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-getpredictiondelay`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-getpredictiondelay`,children:_jsx(_components.code,{children:`VadContext.getPredictionDelay`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getPredictionDelay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Returns end-to-end prediction delay in samples at the initialized host sample rate, including input block adaptation. Query after initialization. Divide by sample rate for seconds.`}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-getrawvadprobability`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-getrawvadprobability`,children:_jsx(_components.code,{children:`VadContext.getRawVadProbability`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRawVadProbability`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns the latest raw speech probability as a number from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),`, before the hold and minimum-duration decision logic. A fresh or reset context reads `,_jsx(_components.code,{children:`0`}),` until new predictions are available.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-isspeechdetected`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-isspeechdetected`,children:_jsx(_components.code,{children:`VadContext.isSpeechDetected`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isSpeechDetected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns the latest speech decision after sensitivity and duration logic. A fresh or reset context reads `,_jsx(_components.code,{children:`false`}),` until processing provides a new decision.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-reset`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-reset`,children:_jsx(_components.code,{children:`VadContext.reset`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`reset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Immediately clears the published speech decision and raw probability, and requests clearing of the underlying signal history on the next processing pass. Preserves the initialized format and configured parameters.`}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-setparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-setparameter`,children:_jsx(_components.code,{children:`VadContext.setParameter`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VadParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Sets the parameter for subsequent processing. Invalid ranges, infinities and NaN throw `,_jsx(_components.code,{children:`RangeError`}),`. Defaults come from the loaded model, so query them rather than assuming a universal preset. See `,_jsx(_components.code,{children:`VadParameter`}),` below for units and ranges.`]}),`\n`,_jsx(`span`,{id:`wasm-vadcontext-updatebearertoken`}),`\n`,_jsx(Heading,{level:`3`,id:`vadcontext-updatebearertoken`,children:_jsx(_components.code,{children:`VadContext.updateBearerToken`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateBearerToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replaces the bearer token for subsequent session requests without creating a new processing instance. Both the original credential and the replacement must be JWT-form credentials. A malformed or unsupported replacement throws and leaves the previous credential in place. Local format acceptance does not prove that the backend accepts the new token. Obtain fresh short-lived tokens through your backend; keep the SDK key on the server. This call returns `,_jsx(_components.code,{children:`void`}),`, not a network-completion promise.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext`}),`\n`,_jsx(Heading,{level:`2`,id:`energyvadcontext`,children:_jsx(_components.code,{children:`EnergyVadContext`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EnergyVadContext`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`An energy VAD handle returned by `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/enhancement#wasm-processor-getenergyvadcontext`,children:_jsx(_components.code,{children:`Processor.getEnergyVadContext`})}),`. Its constructor is private. Detection uses the enhanced signal before output mixing and runs no separate model, so an enhancement model yields speech decisions without loading a dedicated VAD model. Detection advances with `,_jsx(_components.code,{children:`Processor.process`}),`.`]}),`\n`,_jsx(_components.p,{children:`Every handle from one processor refers to the same energy VAD, and each must be freed separately. Freeing a handle does not free the processor or disable detection. A surviving handle stays usable after the processor is freed, but produces no new predictions.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Sensitivity`}),` uses the energy range, `,_jsx(_components.code,{children:`1`}),` through `,_jsx(_components.code,{children:`15`}),`, not the `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),` probability threshold of a dedicated VAD model. See `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/vad#wasm-vadparameter-sensitivity`,children:_jsx(_components.code,{children:`VadParameter.Sensitivity`})}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-free`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-free`,children:_jsx(_components.code,{children:`EnergyVadContext.free`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`free`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Releases this handle. Call it exactly once when finished; it does not free the backing processor.`}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-symbol-dispose`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-symbol-dispose`,children:_jsx(_components.code,{children:`EnergyVadContext.Symbol.dispose`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Symbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dispose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Aliases `,_jsx(_components.code,{children:`free()`}),` when the runtime supports `,_jsx(_components.code,{children:`Symbol.dispose`}),`; do not call both on the same handle. Otherwise, call `,_jsx(_components.code,{children:`free()`}),` in `,_jsx(_components.code,{children:`finally`}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-isspeechdetected`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-isspeechdetected`,children:_jsx(_components.code,{children:`EnergyVadContext.isSpeechDetected`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isSpeechDetected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns the energy VAD’s prediction. It is `,_jsx(_components.code,{children:`false`}),` before audio is processed and after a reset, and lags its input by `,_jsx(_components.code,{children:`getPredictionDelay()`}),` samples. Speech hold and minimum speech duration affect its timing further. The prediction stops updating if the backing processor stops being processed.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-setparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-setparameter`,children:_jsx(_components.code,{children:`EnergyVadContext.setParameter`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VadParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Modifies an energy VAD parameter. `,_jsx(_components.code,{children:`Sensitivity`}),` uses the energy range, `,_jsx(_components.code,{children:`1`}),` through `,_jsx(_components.code,{children:`15`}),`. A value outside the valid range throws a `,_jsx(_components.code,{children:`RangeError`}),`. All parameters can be changed during processing.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-getparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-getparameter`,children:_jsx(_components.code,{children:`EnergyVadContext.getParameter`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VadParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Returns the current value of an energy VAD parameter.`}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-getpredictiondelay`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-getpredictiondelay`,children:_jsx(_components.code,{children:`EnergyVadContext.getPredictionDelay`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getPredictionDelay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns the prediction delay in samples, covering input reblocking, STFT and enhancement model processing. It equals `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/enhancement#wasm-processorcontext-getaudiodelay`,children:_jsx(_components.code,{children:`ProcessorContext.getAudioDelay`})}),` for the backing processor; energy detection does not delay the audio. Speech hold and minimum speech duration affect decision timing and are not included.`]}),`\n`,_jsxs(_components.p,{children:[`Before initialization the value uses the processor’s optimal block size at its native sample rate. After initialization it is expressed in samples at the rate given to `,_jsx(_components.code,{children:`Processor.initialize`}),` and includes input-buffering latency for the configured block size, which a non-optimal or variable block size increases.`]}),`\n`,_jsx(`span`,{id:`wasm-energyvadcontext-reset`}),`\n`,_jsx(Heading,{level:`3`,id:`energyvadcontext-reset`,children:_jsx(_components.code,{children:`EnergyVadContext.reset`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`reset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Clears the energy VAD state, including the published speech decision. Use it when the stream is interrupted or when seeking. Configured parameters are retained and the backing processor is not reset; `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/enhancement#wasm-processorcontext-reset`,children:_jsx(_components.code,{children:`ProcessorContext.reset`})}),` also resets the energy VAD.`]}),`\n`,_jsx(`span`,{id:`wasm-vadparameter`}),`\n`,_jsx(Heading,{level:`2`,id:`vadparameter`,children:_jsx(_components.code,{children:`VadParameter`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` enum`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` VadParameter`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Parameters accepted by the `,_jsx(_components.code,{children:`getParameter`}),` and `,_jsx(_components.code,{children:`setParameter`}),` methods of `,_jsx(_components.code,{children:`VadContext`}),` and `,_jsx(_components.code,{children:`EnergyVadContext`}),`. Defaults are supplied by the model.`]}),`\n`,_jsx(`span`,{id:`wasm-vadparameter-speechholdduration`}),`\n`,_jsx(Heading,{level:`3`,id:`vadparameter-speechholdduration`,children:_jsx(_components.code,{children:`VadParameter.SpeechHoldDuration`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SpeechHoldDuration`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Controls recent-speech hold behavior in seconds. Range: `,_jsx(_components.code,{children:`0`}),` through the model’s maximum supported hold duration. When the current probability is at or below the threshold, the decision uses the positive-frame count in the recent lookback window. Above the threshold, the consecutive-frame rule from `,_jsx(_components.code,{children:`MinimumSpeechDuration`}),` applies. Effective timing follows frame boundaries.`]}),`\n`,_jsx(`span`,{id:`wasm-vadparameter-sensitivity`}),`\n`,_jsx(Heading,{level:`3`,id:`vadparameter-sensitivity`,children:_jsx(_components.code,{children:`VadParameter.Sensitivity`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sensitivity`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Its meaning depends on the detector. On a `,_jsx(_components.code,{children:`VadContext`}),`, a speech-decision probability threshold from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),`, where lower values classify more frames as speech. On an `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/vad#wasm-energyvadcontext`,children:_jsx(_components.code,{children:`EnergyVadContext`})}),`, the energy threshold of the enhanced signal, computed as `,_jsx(_components.code,{children:`10 ** -sensitivity`}),` over `,_jsx(_components.code,{children:`1`}),` through `,_jsx(_components.code,{children:`15`}),`, where higher values detect quieter speech.`]}),`\n`,_jsx(`span`,{id:`wasm-vadparameter-minimumspeechduration`}),`\n`,_jsx(Heading,{level:`3`,id:`vadparameter-minimumspeechduration`,children:_jsx(_components.code,{children:`VadParameter.MinimumSpeechDuration`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MinimumSpeechDuration`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Required speech duration in seconds, from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),`, before speech is detected. Effective timing follows frame boundaries.`]}),`\n`,_jsx(Heading,{level:`2`,id:`read-a-block-prediction`,children:`Read a block prediction`}),`\n`,_jsxs(_components.p,{children:[`This helper assumes the module is initialized, `,_jsx(_components.code,{children:`model`}),` is a live dedicated VAD model, `,_jsx(_components.code,{children:`token`}),` is a backend-issued JWT and `,_jsx(_components.code,{children:`audio`}),` contains one optimal mono block. A single initial block can precede a usable prediction because of model delay and duration settings. Keep a VAD instance alive across the full stream in an integration.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`33`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@ai-coustics/aic-sdk-wasm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/**`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` * `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@param`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` {import(\"@ai-coustics/aic-sdk-wasm\").Model}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` * `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@param`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` {string}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` token`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` * `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@param`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` {Float32Array}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` audio`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` */`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` detectBlock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`audio`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sampleRate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getOptimalSampleRate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` blockSize`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getOptimalBlockSize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sampleRate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`audio`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` blockSize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Expected one optimal block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` vad`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sampleRate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`blockSize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` context`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`audio`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` speech:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isSpeechDetected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` probability:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getRawVadProbability`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` delaySamples:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getPredictionDelay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`finally`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`free`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`finally`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`terminateSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`finally`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` vad`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`free`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"WebAssembly VAD API","description":"Process dedicated VAD models and read speech predictions.","href":"/reference/sdk/api/wasm/vad"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Vad","slug":"vad","depth":2,"children":[{"title":"Vad.free","slug":"vad-free","depth":3,"children":[]},{"title":"Vad.Symbol.dispose","slug":"vad-symbol-dispose","depth":3,"children":[]},{"title":"Vad.getContext","slug":"vad-getcontext","depth":3,"children":[]},{"title":"Vad.initialize","slug":"vad-initialize","depth":3,"children":[]},{"title":"Vad.constructor","slug":"vad-constructor","depth":3,"children":[]},{"title":"Vad.process","slug":"vad-process","depth":3,"children":[]},{"title":"Vad.terminateSession","slug":"vad-terminatesession","depth":3,"children":[]}]},{"title":"VadContext","slug":"vadcontext","depth":2,"children":[{"title":"VadContext.free","slug":"vadcontext-free","depth":3,"children":[]},{"title":"VadContext.Symbol.dispose","slug":"vadcontext-symbol-dispose","depth":3,"children":[]},{"title":"VadContext.getParameter","slug":"vadcontext-getparameter","depth":3,"children":[]},{"title":"VadContext.getPredictionDelay","slug":"vadcontext-getpredictiondelay","depth":3,"children":[]},{"title":"VadContext.getRawVadProbability","slug":"vadcontext-getrawvadprobability","depth":3,"children":[]},{"title":"VadContext.isSpeechDetected","slug":"vadcontext-isspeechdetected","depth":3,"children":[]},{"title":"VadContext.reset","slug":"vadcontext-reset","depth":3,"children":[]},{"title":"VadContext.setParameter","slug":"vadcontext-setparameter","depth":3,"children":[]},{"title":"VadContext.updateBearerToken","slug":"vadcontext-updatebearertoken","depth":3,"children":[]}]},{"title":"EnergyVadContext","slug":"energyvadcontext","depth":2,"children":[{"title":"EnergyVadContext.free","slug":"energyvadcontext-free","depth":3,"children":[]},{"title":"EnergyVadContext.Symbol.dispose","slug":"energyvadcontext-symbol-dispose","depth":3,"children":[]},{"title":"EnergyVadContext.isSpeechDetected","slug":"energyvadcontext-isspeechdetected","depth":3,"children":[]},{"title":"EnergyVadContext.setParameter","slug":"energyvadcontext-setparameter","depth":3,"children":[]},{"title":"EnergyVadContext.getParameter","slug":"energyvadcontext-getparameter","depth":3,"children":[]},{"title":"EnergyVadContext.getPredictionDelay","slug":"energyvadcontext-getpredictiondelay","depth":3,"children":[]},{"title":"EnergyVadContext.reset","slug":"energyvadcontext-reset","depth":3,"children":[]}]},{"title":"VadParameter","slug":"vadparameter","depth":2,"children":[{"title":"VadParameter.SpeechHoldDuration","slug":"vadparameter-speechholdduration","depth":3,"children":[]},{"title":"VadParameter.Sensitivity","slug":"vadparameter-sensitivity","depth":3,"children":[]},{"title":"VadParameter.MinimumSpeechDuration","slug":"vadparameter-minimumspeechduration","depth":3,"children":[]}]},{"title":"Read a block prediction","slug":"read-a-block-prediction","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ai-coustics","siteName":"ai-coustics Docs","title":"WebAssembly VAD API - ai-coustics Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T12:59:03.165Z","originalFileLocation":"reference/sdk/api/wasm/vad.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Process dedicated VAD models and read speech predictions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ai-coustics Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"WebAssembly VAD API - ai-coustics Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Process dedicated VAD models and read speech predictions.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ai-coustics Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ai-coustics.mintlify.site/_mintlify/api/og/v2?division=WebAssembly\u0026amp;title=WebAssembly+VAD+API\u0026amp;description=Process+dedicated+VAD+models+and+read+speech+predictions.\u0026amp;theme=e0930299b035dc5f296d141a\u0026amp;signature=7c0d58ada6423342bf43980e37f25fb4a7ea034dd33743f8f1d0fa39e106465d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"WebAssembly VAD API - ai-coustics Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Process dedicated VAD models and read speech predictions.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ai-coustics.mintlify.site/_mintlify/api/og/v2?division=WebAssembly\u0026amp;title=WebAssembly+VAD+API\u0026amp;description=Process+dedicated+VAD+models+and+read+speech+predictions.\u0026amp;theme=e0930299b035dc5f296d141a\u0026amp;signature=7c0d58ada6423342bf43980e37f25fb4a7ea034dd33743f8f1d0fa39e106465d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ai-coustics/q-jz6v9pdza4WsLO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ai-coustics Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006FFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/sdk/api/wasm/vad.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ai-coustics.com/#organization\",\"name\":\"ai-coustics Docs\",\"url\":\"https://docs.ai-coustics.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ai-coustics/TRQ6cYSvxBnlqNAk/logo/light.svg?fit=max\u0026auto=format\u0026n=TRQ6cYSvxBnlqNAk\u0026q=85\u0026s=811a7351a129b8c16831882725fa1e9f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ai-coustics.com#website\",\"name\":\"ai-coustics Docs\",\"url\":\"https://docs.ai-coustics.com\",\"publisher\":{\"@id\":\"https://docs.ai-coustics.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad#webpage\",\"url\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad\",\"name\":\"WebAssembly VAD API\",\"description\":\"Process dedicated VAD models and read speech predictions.\",\"dateModified\":\"2026-11-06T12:59:03.165Z\",\"isPartOf\":{\"@id\":\"https://docs.ai-coustics.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.ai-coustics.com/reference/sdk/api/python/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebAssembly\",\"item\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WebAssembly VAD API\",\"item\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad#article\",\"headline\":\"WebAssembly VAD API\",\"name\":\"WebAssembly VAD API\",\"description\":\"Process dedicated VAD models and read speech predictions.\",\"url\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/vad#webpage\"},\"dateModified\":\"2026-11-06T12:59:03.165Z\",\"publisher\":{\"@id\":\"https://docs.ai-coustics.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ai-coustics.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ai-coustics Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ai-coustics Docs","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/reference/concepts/audio-format"}]},{"tab":"Models","pages":[{"title":"Models","href":"/reference/sdk/models"}]},{"tab":"Reference","groups":[{"group":"SDK","pages":[{"title":"Language bindings","href":"/reference/sdk/language-bindings"},{"title":"Examples","href":"/reference/sdk/examples"},{"title":"Compatibility matrix","href":"/reference/sdk/compatibility-matrix"}]},{"group":"API reference","pages":[{"group":"Python","pages":[{"title":"Python API reference","href":"/reference/sdk/api/python/index"},{"title":"Python models and configuration","sidebarTitle":"Models and configuration","href":"/reference/sdk/api/python/models-and-config"},{"title":"Python enhancement","sidebarTitle":"Enhancement","href":"/reference/sdk/api/python/enhancement"},{"title":"Python voice activity detection","sidebarTitle":"VAD","href":"/reference/sdk/api/python/vad"},{"title":"Python audio analysis","sidebarTitle":"Audio analysis","href":"/reference/sdk/api/python/analysis"},{"title":"Python errors","href":"/reference/sdk/api/python/errors"}]},{"group":"Node.js","pages":[{"title":"Node.js API reference","href":"/reference/sdk/api/node/index"},{"title":"Node.js models and configuration","href":"/reference/sdk/api/node/models-and-config"},{"title":"Node.js enhancement API","href":"/reference/sdk/api/node/enhancement"},{"title":"Node.js VAD API","href":"/reference/sdk/api/node/vad"},{"title":"Node.js analysis API","href":"/reference/sdk/api/node/analysis"},{"title":"Node.js errors","href":"/reference/sdk/api/node/errors"}]},{"group":"C","pages":[{"title":"C API reference","href":"/reference/sdk/api/c/index"},{"title":"C models and configuration","href":"/reference/sdk/api/c/models-and-config"},{"title":"C enhancement and processor control","href":"/reference/sdk/api/c/processing"},{"title":"C voice activity detection","href":"/reference/sdk/api/c/vad"},{"title":"C audio analysis","href":"/reference/sdk/api/c/analysis"},{"title":"C errors and types","href":"/reference/sdk/api/c/errors-and-types"}]},{"group":"C++","pages":[{"title":"C++ API reference","href":"/reference/sdk/api/cpp/index"},{"title":"C++ models and configuration","href":"/reference/sdk/api/cpp/models-and-config"},{"title":"C++ enhancement and processor control","href":"/reference/sdk/api/cpp/processing"},{"title":"C++ voice activity detection","href":"/reference/sdk/api/cpp/vad"},{"title":"C++ audio analysis","href":"/reference/sdk/api/cpp/analysis"},{"title":"C++ results and errors","href":"/reference/sdk/api/cpp/results-and-errors"}]},{"group":"Rust","pages":[{"title":"Rust API reference","href":"/reference/sdk/api/rust/index"},{"title":"Rust models and configuration","href":"/reference/sdk/api/rust/models-and-config"},{"title":"Rust enhancement","href":"/reference/sdk/api/rust/enhancement"},{"title":"Rust voice activity detection","href":"/reference/sdk/api/rust/vad"},{"title":"Rust audio analysis","href":"/reference/sdk/api/rust/analysis"},{"title":"Rust errors and features","href":"/reference/sdk/api/rust/errors-and-features"}]},{"group":"WebAssembly","pages":[{"title":"WebAssembly API reference","href":"/reference/sdk/api/wasm/index"},{"title":"WebAssembly initialization and lifecycle","href":"/reference/sdk/api/wasm/initialization"},{"title":"WebAssembly model API","href":"/reference/sdk/api/wasm/models-and-config"},{"title":"WebAssembly enhancement API","description":"Process audio blocks and control enhancement state.","href":"/reference/sdk/api/wasm/enhancement"},{"title":"WebAssembly VAD API","href":"/reference/sdk/api/wasm/vad"},{"title":"WebAssembly analysis API","description":"Collect audio, analyze a window and release analysis results.","href":"/reference/sdk/api/wasm/analysis"},{"title":"WebAssembly errors","href":"/reference/sdk/api/wasm/errors"}]}]},{"group":"Upgrades","pages":[{"title":"SDK and model versions","href":"/reference/sdk/upgrading"}]},{"group":"LiveKit","pages":[{"title":"Which LiveKit plugin to use","sidebarTitle":"Plugin scope","href":"/reference/livekit/plugin-scope"},{"title":"Migrate from livekit-plugins to livekit-extras","sidebarTitle":"Migrate to livekit-extras","href":"/reference/livekit/migrate-to-livekit-extras"}]},{"group":"AI tools","pages":[{"title":"MCP server and text export","href":"/reference/agents/mcp-server"}]},{"group":"Historical migrations","pages":[{"title":"Migrate to Mono Processing","sidebarTitle":"Multi-channel to mono","href":"/reference/deprecated/multi-channel-to-mono"},{"title":"Migrate to the Dedicated VAD","sidebarTitle":"Energy-based VAD to VAD","href":"/reference/deprecated/energy-vad-to-dedicated-vad"},{"title":"Migrate Python SDK 2.5 to 3.0","sidebarTitle":"Python SDK 2.5 to 3.0","href":"/reference/deprecated/python-2-5-to-3-0"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"WebAssembly VAD API - ai-coustics Docs","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DcUtcwZ_.js","dist-CJ9Oly2E.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-C5EfhVm0.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}