A synchronous mono enhancement stream. Each instance has its own signal state and retains the model weights. Use one instance per stream and process blocks in order.
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 this processor’s shared control state. Repeated calls produce separate handles to the same state. Free each returned context when finished.
Renamed in 0.25.0. This method was getProcessorContext() through 0.23.0.
Returns a newly owned EnergyVadContext that detects speech from this processor’s enhanced signal before output mixing, without running a separate model. Detection advances with process; there is no separate process call. Every handle from one processor refers to the same energy VAD, and each must be freed separately.Creating a handle keeps enhancement inference active even when the processor is bypassed or its enhancement level is zero, and it stays active for the processor’s lifetime after all handles are freed. Freeing the processor stops new predictions but leaves the handle usable.
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 an enhancement stream using a live model and the credential in license_key. For browser applications, pass a short-lived JWT supplied by your backend. Enhancement and bypass model types are accepted; dedicated VAD and analysis models are rejected. The constructor can throw for model creation, model type or credential errors. It does not initialize the audio format. No OpenTelemetry configuration argument is exposed.
Processes one block of normalized mono floating-point samples and writes the enhanced samples back into the same Float32Array. Returns void. The generated binding copies input into WebAssembly memory and copies processed values back; this is not zero-copy processing. Requires successful initialization and the configured block length. Throws for mismatched audio, disallowed processing or runtime failures. Do not rely on the input remaining unchanged if processing throws.
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 control handle returned by Processor.getContext. Its constructor is private. Each returned context is separately owned and must be freed. Freeing a context does not free the processor. A context can retain control state after the processor is freed, but it does not keep an active processing stream alive.
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 end-to-end processing delay in samples at the initialized host sample rate, including block adaptation and model delay. Query after initialization or reinitialization. Divide by the host sample rate to convert to seconds.
Requests clearing of signal history on the next processing pass, retaining the initialized audio configuration and parameter values. Any energy VAD on this processor is reset as well. Use when beginning a new unrelated stream. It does not allocate a new processor or terminate its session.
Sets the selected parameter. Both parameters accept finite values from 0 through 1; out-of-range values and NaN throw RangeError. Changes affect subsequent processing. See ProcessorParameter below for defaults and interpretation.
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.
Normalized enhancement amount from 0 through 1. 0 is dry output and 1 uses the model’s maximum enhancement. The initial value is the model’s default, falling back to 1 when absent.
This helper assumes module initialization has completed, model is a live enhancement model, token is a backend-issued JWT and audio contains exactly one optimal block of mono samples. It copies the caller’s block before enhancement, then returns the enhanced block and delay. For a stream, retain the processor across blocks instead of creating it for each call.
{"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/enhancement","slug":"/reference/sdk/api/wasm/enhancement","pageMetadata":{"title":"WebAssembly enhancement API","description":"Process audio blocks and control enhancement state.","href":"/reference/sdk/api/wasm/enhancement"},"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 audio blocks and control enhancement state.\"\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-processor`}),`\n`,_jsx(Heading,{level:`2`,id:`processor`,children:_jsx(_components.code,{children:`Processor`})}),`\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:` Processor`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A synchronous mono enhancement stream. Each instance has its own signal state and retains the model weights. Use one instance per stream and process blocks in order.`}),`\n`,_jsx(`span`,{id:`wasm-processor-free`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-free`,children:_jsx(_components.code,{children:`Processor.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-processor-symbol-dispose`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-symbol-dispose`,children:_jsx(_components.code,{children:`Processor.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-processor-getcontext`}),`\n`,_jsx(`span`,{id:`wasm-processor-getprocessorcontext`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-getcontext`,children:_jsx(_components.code,{children:`Processor.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:`ProcessorContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Returns a newly owned handle to this processor’s shared control state. Repeated calls produce separate handles to the same state. Free each returned context when finished.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Renamed in 0.25.0. This method was `,_jsx(_components.code,{children:`getProcessorContext()`}),` through 0.23.0.`]})}),`\n`,_jsx(`span`,{id:`wasm-processor-getenergyvadcontext`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-getenergyvadcontext`,children:_jsx(_components.code,{children:`Processor.getEnergyVadContext`})}),`\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:`getEnergyVadContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(): `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`EnergyVadContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns a newly owned `,_jsx(_components.a,{href:`/reference/sdk/api/wasm/vad#wasm-energyvadcontext`,children:_jsx(_components.code,{children:`EnergyVadContext`})}),` that detects speech from this processor’s enhanced signal before output mixing, without running a separate model. Detection advances with `,_jsx(_components.code,{children:`process`}),`; there is no separate process call. Every handle from one processor refers to the same energy VAD, and each must be freed separately.`]}),`\n`,_jsx(_components.p,{children:`Creating a handle keeps enhancement inference active even when the processor is bypassed or its enhancement level is zero, and it stays active for the processor’s lifetime after all handles are freed. Freeing the processor stops new predictions but leaves the handle usable.`}),`\n`,_jsx(`span`,{id:`wasm-processor-initialize`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-initialize`,children:_jsx(_components.code,{children:`Processor.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-processor-constructor`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-constructor`,children:_jsx(_components.code,{children:`Processor.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 an enhancement stream using a live `,_jsx(_components.code,{children:`model`}),` and the credential in `,_jsx(_components.code,{children:`license_key`}),`. For browser applications, pass a short-lived JWT supplied by your backend. Enhancement and bypass model types are accepted; dedicated VAD and analysis models are rejected. The constructor can throw for model creation, model type or credential errors. It does not initialize the audio format. No OpenTelemetry configuration argument is exposed.`]}),`\n`,_jsx(`span`,{id:`wasm-processor-process`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-process`,children:_jsx(_components.code,{children:`Processor.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 floating-point samples and writes the enhanced samples back into the same `,_jsx(_components.code,{children:`Float32Array`}),`. Returns `,_jsx(_components.code,{children:`void`}),`. The generated binding copies input into WebAssembly memory and copies processed values back; this is not zero-copy processing. Requires successful initialization and the configured block length. Throws for mismatched audio, disallowed processing or runtime failures. Do not rely on the input remaining unchanged if processing throws.`]}),`\n`,_jsx(`span`,{id:`wasm-processor-terminatesession`}),`\n`,_jsx(Heading,{level:`3`,id:`processor-terminatesession`,children:_jsx(_components.code,{children:`Processor.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-processorcontext`}),`\n`,_jsx(Heading,{level:`2`,id:`processorcontext`,children:_jsx(_components.code,{children:`ProcessorContext`})}),`\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:` ProcessorContext`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A shared control handle returned by `,_jsx(_components.code,{children:`Processor.getContext`}),`. Its constructor is private. Each returned context is separately owned and must be freed. Freeing a context does not free the processor. A context can retain control state after the processor is freed, but it does not keep an active processing stream alive.`]}),`\n`,_jsx(`span`,{id:`wasm-processorcontext-free`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-free`,children:_jsx(_components.code,{children:`ProcessorContext.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-processorcontext-symbol-dispose`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-symbol-dispose`,children:_jsx(_components.code,{children:`ProcessorContext.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-processorcontext-getaudiodelay`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-getaudiodelay`,children:_jsx(_components.code,{children:`ProcessorContext.getAudioDelay`})}),`\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:`getAudioDelay`}),_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 processing delay in samples at the initialized host sample rate, including block adaptation and model delay. Query after initialization or reinitialization. Divide by the host sample rate to convert to seconds.`}),`\n`,_jsx(`span`,{id:`wasm-processorcontext-getparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-getparameter`,children:_jsx(_components.code,{children:`ProcessorContext.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:`ProcessorParameter`}),_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 value for a `,_jsx(_components.code,{children:`ProcessorParameter`}),`. Bypass reads as `,_jsx(_components.code,{children:`0`}),` or `,_jsx(_components.code,{children:`1`}),`; enhancement level is a normalized floating-point value.`]}),`\n`,_jsx(`span`,{id:`wasm-processorcontext-reset`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-reset`,children:_jsx(_components.code,{children:`ProcessorContext.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:`Requests clearing of signal history on the next processing pass, retaining the initialized audio configuration and parameter values. Any energy VAD on this processor is reset as well. Use when beginning a new unrelated stream. It does not allocate a new processor or terminate its session.`}),`\n`,_jsx(`span`,{id:`wasm-processorcontext-setparameter`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-setparameter`,children:_jsx(_components.code,{children:`ProcessorContext.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:`ProcessorParameter`}),_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 selected parameter. Both parameters accept finite values from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),`; out-of-range values and NaN throw `,_jsx(_components.code,{children:`RangeError`}),`. Changes affect subsequent processing. See `,_jsx(_components.code,{children:`ProcessorParameter`}),` below for defaults and interpretation.`]}),`\n`,_jsx(`span`,{id:`wasm-processorcontext-updatebearertoken`}),`\n`,_jsx(Heading,{level:`3`,id:`processorcontext-updatebearertoken`,children:_jsx(_components.code,{children:`ProcessorContext.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-processorparameter`}),`\n`,_jsx(Heading,{level:`2`,id:`processorparameter`,children:_jsx(_components.code,{children:`ProcessorParameter`})}),`\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:` ProcessorParameter`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Parameters accepted by `,_jsx(_components.code,{children:`ProcessorContext.getParameter`}),` and `,_jsx(_components.code,{children:`setParameter`}),`.`]}),`\n`,_jsx(`span`,{id:`wasm-processorparameter-bypass`}),`\n`,_jsx(Heading,{level:`3`,id:`processorparameter-bypass`,children:_jsx(_components.code,{children:`ProcessorParameter.Bypass`})}),`\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:`Bypass`}),_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:[_jsx(_components.code,{children:`0`}),` disables bypass; any accepted value greater than `,_jsx(_components.code,{children:`0`}),` enables bypass and reads back as `,_jsx(_components.code,{children:`1`}),`. Default: `,_jsx(_components.code,{children:`0`}),`. Bypass preserves the configured processing delay.`]}),`\n`,_jsx(`span`,{id:`wasm-processorparameter-enhancementlevel`}),`\n`,_jsx(Heading,{level:`3`,id:`processorparameter-enhancementlevel`,children:_jsx(_components.code,{children:`ProcessorParameter.EnhancementLevel`})}),`\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:`EnhancementLevel`}),_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:[`Normalized enhancement amount from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`1`}),`. `,_jsx(_components.code,{children:`0`}),` is dry output and `,_jsx(_components.code,{children:`1`}),` uses the model’s maximum enhancement. The initial value is the model’s default, falling back to `,_jsx(_components.code,{children:`1`}),` when absent.`]}),`\n`,_jsx(Heading,{level:`2`,id:`process-one-block`,children:`Process one block`}),`\n`,_jsxs(_components.p,{children:[`This helper assumes module initialization has completed, `,_jsx(_components.code,{children:`model`}),` is a live enhancement model, `,_jsx(_components.code,{children:`token`}),` is a backend-issued JWT and `,_jsx(_components.code,{children:`audio`}),` contains exactly one optimal block of mono samples. It copies the caller’s block before enhancement, then returns the enhanced block and delay. For a stream, retain the processor across blocks instead of creating it for each call.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,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:`30`,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:`Processor`}),_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:` enhanceBlock`}),_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:` processor`}),_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:` Processor`}),_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:` processor`}),_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:` processor`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` output`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`slice`}),_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:` processor`}),_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:`output`}),_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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`output`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`getAudioDelay`}),_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:` processor`}),_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:` processor`}),_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 enhancement API","description":"Process audio blocks and control enhancement state.","href":"/reference/sdk/api/wasm/enhancement"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Processor","slug":"processor","depth":2,"children":[{"title":"Processor.free","slug":"processor-free","depth":3,"children":[]},{"title":"Processor.Symbol.dispose","slug":"processor-symbol-dispose","depth":3,"children":[]},{"title":"Processor.getContext","slug":"processor-getcontext","depth":3,"children":[]},{"title":"Processor.getEnergyVadContext","slug":"processor-getenergyvadcontext","depth":3,"children":[]},{"title":"Processor.initialize","slug":"processor-initialize","depth":3,"children":[]},{"title":"Processor.constructor","slug":"processor-constructor","depth":3,"children":[]},{"title":"Processor.process","slug":"processor-process","depth":3,"children":[]},{"title":"Processor.terminateSession","slug":"processor-terminatesession","depth":3,"children":[]}]},{"title":"ProcessorContext","slug":"processorcontext","depth":2,"children":[{"title":"ProcessorContext.free","slug":"processorcontext-free","depth":3,"children":[]},{"title":"ProcessorContext.Symbol.dispose","slug":"processorcontext-symbol-dispose","depth":3,"children":[]},{"title":"ProcessorContext.getAudioDelay","slug":"processorcontext-getaudiodelay","depth":3,"children":[]},{"title":"ProcessorContext.getParameter","slug":"processorcontext-getparameter","depth":3,"children":[]},{"title":"ProcessorContext.reset","slug":"processorcontext-reset","depth":3,"children":[]},{"title":"ProcessorContext.setParameter","slug":"processorcontext-setparameter","depth":3,"children":[]},{"title":"ProcessorContext.updateBearerToken","slug":"processorcontext-updatebearertoken","depth":3,"children":[]}]},{"title":"ProcessorParameter","slug":"processorparameter","depth":2,"children":[{"title":"ProcessorParameter.Bypass","slug":"processorparameter-bypass","depth":3,"children":[]},{"title":"ProcessorParameter.EnhancementLevel","slug":"processorparameter-enhancementlevel","depth":3,"children":[]}]},{"title":"Process one block","slug":"process-one-block","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ai-coustics","siteName":"ai-coustics Docs","title":"WebAssembly enhancement API - ai-coustics Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T12:59:03.167Z","originalFileLocation":"reference/sdk/api/wasm/enhancement.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 audio blocks and control enhancement state.\">\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 enhancement API - ai-coustics Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Process audio blocks and control enhancement state.\">\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/enhancement\">\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+enhancement+API\u0026amp;description=Process+audio+blocks+and+control+enhancement+state.\u0026amp;theme=e0930299b035dc5f296d141a\u0026amp;signature=a91f628fd62a001d945a373722a19b6d34458c59cd6cb9a11fa63c4c16e22ad5\">\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 enhancement API - ai-coustics Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Process audio blocks and control enhancement state.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ai-coustics.mintlify.site/_mintlify/api/og/v2?division=WebAssembly\u0026amp;title=WebAssembly+enhancement+API\u0026amp;description=Process+audio+blocks+and+control+enhancement+state.\u0026amp;theme=e0930299b035dc5f296d141a\u0026amp;signature=a91f628fd62a001d945a373722a19b6d34458c59cd6cb9a11fa63c4c16e22ad5\">\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/enhancement\">\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/enhancement.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/enhancement#webpage\",\"url\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement\",\"name\":\"WebAssembly enhancement API\",\"description\":\"Process audio blocks and control enhancement state.\",\"dateModified\":\"2026-11-06T12:59:03.167Z\",\"isPartOf\":{\"@id\":\"https://docs.ai-coustics.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement#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 enhancement API\",\"item\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement#article\",\"headline\":\"WebAssembly enhancement API\",\"name\":\"WebAssembly enhancement API\",\"description\":\"Process audio blocks and control enhancement state.\",\"url\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ai-coustics.com/reference/sdk/api/wasm/enhancement#webpage\"},\"dateModified\":\"2026-11-06T12:59:03.167Z\",\"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","description":"Load model bytes and inspect model metadata.","href":"/reference/sdk/api/wasm/models-and-config"},{"title":"WebAssembly enhancement API","href":"/reference/sdk/api/wasm/enhancement"},{"title":"WebAssembly VAD API","description":"Process dedicated VAD models and read speech predictions.","href":"/reference/sdk/api/wasm/vad"},{"title":"WebAssembly analysis API","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 enhancement 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"]}