@pexip/media-processor 20.3.4 → 20.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/api-docs/README.mdx +411 -0
- package/api-docs/enumerations/AbortReason.mdx +5 -0
- package/api-docs/functions/avg.mdx +15 -0
- package/api-docs/functions/calculateDistance.mdx +18 -0
- package/api-docs/functions/closedCurve.mdx +27 -0
- package/api-docs/functions/copyByteBufferToFloatBuffer.mdx +16 -0
- package/api-docs/functions/createAnalyzerGraphNode.mdx +19 -0
- package/api-docs/functions/createAnalyzerSubscribableGraphNode.mdx +15 -0
- package/api-docs/functions/createAsyncCallbackLoop.mdx +35 -0
- package/api-docs/functions/createAudioContext.mdx +22 -0
- package/api-docs/functions/createAudioDestinationGraphNode.mdx +9 -0
- package/api-docs/functions/createAudioGraph.mdx +28 -0
- package/api-docs/functions/createAudioGraphProxy.mdx +14 -0
- package/api-docs/functions/createAudioSignalDetector.mdx +51 -0
- package/api-docs/functions/createAudioStats.mdx +19 -0
- package/api-docs/functions/createBenchmark.mdx +14 -0
- package/api-docs/functions/createCanvas.mdx +16 -0
- package/api-docs/functions/createCanvasTransform.mdx +14 -0
- package/api-docs/functions/createChannelMergerGraphNode.mdx +19 -0
- package/api-docs/functions/createChannelSplitterGraphNode.mdx +19 -0
- package/api-docs/functions/createDelayGraphNode.mdx +19 -0
- package/api-docs/functions/createDenoiseWorkletGraphNode.mdx +16 -0
- package/api-docs/functions/createFrameCallbackRequest.mdx +29 -0
- package/api-docs/functions/createGainGraphNode.mdx +15 -0
- package/api-docs/functions/createMediaElementSourceGraphNode.mdx +15 -0
- package/api-docs/functions/createSegmenter.mdx +14 -0
- package/api-docs/functions/createStreamDestinationGraphNode.mdx +15 -0
- package/api-docs/functions/createStreamSourceGraphNode.mdx +16 -0
- package/api-docs/functions/createVADetector.mdx +54 -0
- package/api-docs/functions/createVideoProcessor.mdx +14 -0
- package/api-docs/functions/createVideoTrackProcessor.mdx +9 -0
- package/api-docs/functions/createVideoTrackProcessorWithFallback.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromProbability.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromTimeData.mdx +19 -0
- package/api-docs/functions/curve.mdx +15 -0
- package/api-docs/functions/fromByteToFloat.mdx +27 -0
- package/api-docs/functions/fromFloatToByte.mdx +27 -0
- package/api-docs/functions/getAudioStats.mdx +19 -0
- package/api-docs/functions/getBezierCurveControlPoints.mdx +26 -0
- package/api-docs/functions/isAnalyzerNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioNode.mdx +13 -0
- package/api-docs/functions/isAudioNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioParam.mdx +13 -0
- package/api-docs/functions/isClipping.mdx +18 -0
- package/api-docs/functions/isEqualSize.mdx +22 -0
- package/api-docs/functions/isLowVolume.mdx +19 -0
- package/api-docs/functions/isMono.mdx +22 -0
- package/api-docs/functions/isRenderEffects.mdx +13 -0
- package/api-docs/functions/isSilent.mdx +22 -0
- package/api-docs/functions/isVoiceActivity.mdx +29 -0
- package/api-docs/functions/line.mdx +15 -0
- package/api-docs/functions/loadScript.mdx +14 -0
- package/api-docs/functions/loadWasms.mdx +13 -0
- package/api-docs/functions/pow.mdx +29 -0
- package/api-docs/functions/processAverageVolume.mdx +15 -0
- package/api-docs/functions/resumeAudioOnInterruption.mdx +23 -0
- package/api-docs/functions/resumeAudioOnUnmute.mdx +27 -0
- package/api-docs/functions/rms.mdx +15 -0
- package/api-docs/functions/round.mdx +23 -0
- package/api-docs/functions/subscribeTimeoutAnalyzerNode.mdx +22 -0
- package/api-docs/functions/subscribeWorkletNode.mdx +28 -0
- package/api-docs/functions/sum.mdx +15 -0
- package/api-docs/functions/toDecibel.mdx +18 -0
- package/api-docs/interfaces/Analyzer.mdx +368 -0
- package/api-docs/interfaces/AnalyzerSubscribableOptions.mdx +11 -0
- package/api-docs/interfaces/AsyncAssets.mdx +7 -0
- package/api-docs/interfaces/AudioGraph.mdx +92 -0
- package/api-docs/interfaces/AudioGraphOptions.mdx +6 -0
- package/api-docs/interfaces/AudioNodeInit.mdx +127 -0
- package/api-docs/interfaces/AudioNodeProps.mdx +15 -0
- package/api-docs/interfaces/AudioStats.mdx +16 -0
- package/api-docs/interfaces/BackgroundImage.mdx +6 -0
- package/api-docs/interfaces/Benchmark.mdx +35 -0
- package/api-docs/interfaces/Clock.mdx +11 -0
- package/api-docs/interfaces/Denoise.mdx +50 -0
- package/api-docs/interfaces/Detector.mdx +81 -0
- package/api-docs/interfaces/Frame.mdx +11 -0
- package/api-docs/interfaces/Gain.mdx +227 -0
- package/api-docs/interfaces/ImageRecord.mdx +6 -0
- package/api-docs/interfaces/ImageSegmenterOptions.mdx +8 -0
- package/api-docs/interfaces/MPMask.mdx +145 -0
- package/api-docs/interfaces/Point.mdx +10 -0
- package/api-docs/interfaces/Process.mdx +46 -0
- package/api-docs/interfaces/ProcessEventClose.mdx +7 -0
- package/api-docs/interfaces/ProcessEventDebug.mdx +14 -0
- package/api-docs/interfaces/ProcessEventDestroy.mdx +7 -0
- package/api-docs/interfaces/ProcessEventOpen.mdx +14 -0
- package/api-docs/interfaces/ProcessEventProcess.mdx +14 -0
- package/api-docs/interfaces/ProcessEventUpdate.mdx +14 -0
- package/api-docs/interfaces/ProcessWorkerDebugMessage.mdx +6 -0
- package/api-docs/interfaces/ProcessWorkerEvent.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventDebug.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventOpened.mdx +5 -0
- package/api-docs/interfaces/ProcessWorkerEventProcessed.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventUpdated.mdx +5 -0
- package/api-docs/interfaces/ProcessorEvent.mdx +7 -0
- package/api-docs/interfaces/ProcessorOptions.mdx +16 -0
- package/api-docs/interfaces/ProcessorProcessOptions.mdx +6 -0
- package/api-docs/interfaces/Rect.mdx +8 -0
- package/api-docs/interfaces/RenderEventHandlers.mdx +7 -0
- package/api-docs/interfaces/Renderer.mdx +64 -0
- package/api-docs/interfaces/RendererOptions.mdx +15 -0
- package/api-docs/interfaces/Runner.mdx +41 -0
- package/api-docs/interfaces/Segmentation.mdx +5 -0
- package/api-docs/interfaces/SegmentationModelAsset.mdx +8 -0
- package/api-docs/interfaces/SegmentationParams.mdx +18 -0
- package/api-docs/interfaces/SegmentationSmoothingConfig.mdx +5 -0
- package/api-docs/interfaces/Segmenter.mdx +121 -0
- package/api-docs/interfaces/SegmenterOptions.mdx +13 -0
- package/api-docs/interfaces/Size.mdx +10 -0
- package/api-docs/interfaces/StatsOptions.mdx +10 -0
- package/api-docs/interfaces/SubscribableOptions.mdx +9 -0
- package/api-docs/interfaces/ThrottleOptions.mdx +8 -0
- package/api-docs/interfaces/Transform.mdx +62 -0
- package/api-docs/interfaces/VideoFrameLike.mdx +8 -0
- package/api-docs/interfaces/VideoProcessor.mdx +38 -0
- package/api-docs/interfaces/WorkletMessagePortOptions.mdx +16 -0
- package/api-docs/interfaces/WorkletModule.mdx +6 -0
- package/api-docs/type-aliases/AnalyzerNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AsyncCallback.mdx +7 -0
- package/api-docs/type-aliases/AudioBufferBytes.mdx +5 -0
- package/api-docs/type-aliases/AudioBufferFloats.mdx +6 -0
- package/api-docs/type-aliases/AudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnection.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnections.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeParam.mdx +3 -0
- package/api-docs/type-aliases/AudioSamples.mdx +17 -0
- package/api-docs/type-aliases/BaseAudioNode.mdx +3 -0
- package/api-docs/type-aliases/Callback.mdx +20 -0
- package/api-docs/type-aliases/Canvas.mdx +3 -0
- package/api-docs/type-aliases/CanvasContext.mdx +3 -0
- package/api-docs/type-aliases/ChannelSplitterNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Color.mdx +12 -0
- package/api-docs/type-aliases/ConnectInitParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectInitParamType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamBase.mdx +11 -0
- package/api-docs/type-aliases/ConnectParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamType.mdx +3 -0
- package/api-docs/type-aliases/DelayNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Delegate.mdx +3 -0
- package/api-docs/type-aliases/DenoiseWorkletNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ExtractMessageEventType.mdx +9 -0
- package/api-docs/type-aliases/GainNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ImageMapIterable.mdx +3 -0
- package/api-docs/type-aliases/ImageType.mdx +6 -0
- package/api-docs/type-aliases/IncludeMessageEventDataType.mdx +10 -0
- package/api-docs/type-aliases/InputFrame.mdx +3 -0
- package/api-docs/type-aliases/IsVoice.mdx +19 -0
- package/api-docs/type-aliases/MediaElementAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Node.mdx +3 -0
- package/api-docs/type-aliases/NodeConnectionAction.mdx +3 -0
- package/api-docs/type-aliases/Nodes.mdx +3 -0
- package/api-docs/type-aliases/ProcessEvents.mdx +17 -0
- package/api-docs/type-aliases/ProcessInputType.mdx +3 -0
- package/api-docs/type-aliases/ProcessStatus.mdx +3 -0
- package/api-docs/type-aliases/ProcessVideoTrack.mdx +15 -0
- package/api-docs/type-aliases/ProcessWorkerEvents.mdx +18 -0
- package/api-docs/type-aliases/ProcessorEvents.mdx +3 -0
- package/api-docs/type-aliases/ProcessorWorkerEvents.mdx +3 -0
- package/api-docs/type-aliases/RenderBackend.mdx +3 -0
- package/api-docs/type-aliases/RenderEffects.mdx +3 -0
- package/api-docs/type-aliases/RenderingEvents.mdx +3 -0
- package/api-docs/type-aliases/RunnerCreator.mdx +21 -0
- package/api-docs/type-aliases/SegmentationModel.mdx +3 -0
- package/api-docs/type-aliases/SegmentationTransform.mdx +3 -0
- package/api-docs/type-aliases/TupleOf.mdx +12 -0
- package/api-docs/type-aliases/UniversalAudioContextState.mdx +6 -0
- package/api-docs/type-aliases/Unsubscribe.mdx +9 -0
- package/api-docs/type-aliases/WasmPaths.mdx +3 -0
- package/api-docs/variables/BACKGROUND_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/CLIP_COUNT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/CLIP_THRESHOLD.mdx +5 -0
- package/api-docs/variables/EDGE_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/FOREGROUND_THRESHOLD.mdx +3 -0
- package/api-docs/variables/FRAME_RATE.mdx +3 -0
- package/api-docs/variables/LOW_VOLUME_THRESHOLD.mdx +5 -0
- package/api-docs/variables/MASK_COMBINE_RATIO.mdx +3 -0
- package/api-docs/variables/MONO_THRESHOLD.mdx +6 -0
- package/api-docs/variables/PLAY_VIDEO_TIMEOUT.mdx +3 -0
- package/api-docs/variables/PROCESSING_HEIGHT.mdx +3 -0
- package/api-docs/variables/PROCESSING_WIDTH.mdx +3 -0
- package/api-docs/variables/PROCESS_STATUS.mdx +22 -0
- package/api-docs/variables/RENDERING_EVENTS.mdx +14 -0
- package/api-docs/variables/RENDER_BACKEND.mdx +10 -0
- package/api-docs/variables/RENDER_EFFECT.mdx +11 -0
- package/api-docs/variables/SEGMENTATION_MODELS.mdx +10 -0
- package/api-docs/variables/SILENT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/VOICE_PROBABILITY_THRESHOLD.mdx +5 -0
- package/api-docs/variables/calculateMaxBlurPass.mdx +13 -0
- package/api-docs/variables/clamping.mdx +26 -0
- package/api-docs/variables/createLazyProps.mdx +19 -0
- package/api-docs/variables/createObjectUpdater.mdx +31 -0
- package/api-docs/variables/createRemoteImageBitmap.mdx +21 -0
- package/api-docs/variables/getErrorMessage.mdx +13 -0
- package/api-docs/variables/handleWebGLContextLoss.mdx +21 -0
- package/api-docs/variables/isRenderingEvents.mdx +13 -0
- package/api-docs/variables/isSegmentationModel.mdx +13 -0
- package/api-docs/variables/resize.mdx +30 -0
- package/api-docs/variables/toRenderingEvents.mdx +13 -0
- package/api-docs/variables/urls.mdx +10 -0
- package/package.json +14 -9
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
A wrapper for the Denoise wasm module
|
|
2
|
+
|
|
3
|
+
## Methods
|
|
4
|
+
|
|
5
|
+
### vad()
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
vad(channel): number;
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
#### Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| `channel` | `number` |
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
`number`
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### free()
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
free(): void;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Returns
|
|
30
|
+
|
|
31
|
+
`void`
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### pipe()
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
pipe(inputs, outputs): void;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Parameters
|
|
42
|
+
|
|
43
|
+
| Parameter | Type |
|
|
44
|
+
| ------ | ------ |
|
|
45
|
+
| `inputs` | `Float32Array`\<`ArrayBufferLike`\>[][] |
|
|
46
|
+
| `outputs` | `Float32Array`\<`ArrayBufferLike`\>[][] |
|
|
47
|
+
|
|
48
|
+
#### Returns
|
|
49
|
+
|
|
50
|
+
`void`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`Process`](Process.mdx)
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
| Type Parameter |
|
|
8
|
+
| ------ |
|
|
9
|
+
| `T` |
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type | Inherited from |
|
|
14
|
+
| ------ | ------ | ------ |
|
|
15
|
+
| <a id="status"></a> `status` | \| `"closed"` \| `"closing"` \| `"Error"` \| `"destroyed"` \| `"destroying"` \| `"idle"` \| `"new"` \| `"opened"` \| `"opening"` \| `"processing"` \| `"updated"` \| `"updating"` | [`Process`](Process.mdx).[`status`](Process.mdx#status) |
|
|
16
|
+
|
|
17
|
+
## Methods
|
|
18
|
+
|
|
19
|
+
### open()
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
open(): Promise<void>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<`void`\>
|
|
28
|
+
|
|
29
|
+
#### Inherited from
|
|
30
|
+
|
|
31
|
+
[`Process`](Process.mdx).[`open`](Process.mdx#open)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### close()
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
close(): void;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
`void`
|
|
44
|
+
|
|
45
|
+
#### Inherited from
|
|
46
|
+
|
|
47
|
+
[`Process`](Process.mdx).[`close`](Process.mdx#close)
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### destroy()
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
destroy(): Promise<void>;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
`Promise`\<`void`\>
|
|
60
|
+
|
|
61
|
+
#### Inherited from
|
|
62
|
+
|
|
63
|
+
[`Process`](Process.mdx).[`destroy`](Process.mdx#destroy)
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### detect()
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
detect(input): Promise<T>;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
| Parameter | Type |
|
|
76
|
+
| ------ | ------ |
|
|
77
|
+
| `input` | [`ProcessInputType`](../type-aliases/ProcessInputType.mdx) |
|
|
78
|
+
|
|
79
|
+
#### Returns
|
|
80
|
+
|
|
81
|
+
`Promise`\<`T`\>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`Size`](Size.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Inherited from |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="width"></a> `width` | `number` | [`Size`](Size.mdx).[`width`](Size.mdx#width) |
|
|
10
|
+
| <a id="height"></a> `height` | `number` | [`Size`](Size.mdx).[`height`](Size.mdx#height) |
|
|
11
|
+
| <a id="source"></a> `source` | \| [`Canvas`](../type-aliases/Canvas.mdx) \| `HTMLVideoElement` \| `HTMLImageElement` | - |
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Modifier | Type |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="node"></a> `node` | `readonly` | `GainNode` |
|
|
10
|
+
| <a id="mute"></a> `mute` | `public` | `boolean` |
|
|
11
|
+
|
|
12
|
+
## Methods
|
|
13
|
+
|
|
14
|
+
### connect()
|
|
15
|
+
|
|
16
|
+
#### Call Signature
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
connect(
|
|
20
|
+
destinationNode,
|
|
21
|
+
output?,
|
|
22
|
+
input?): AudioNode;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
|
|
26
|
+
|
|
27
|
+
##### Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `destinationNode` | `AudioNode` |
|
|
32
|
+
| `output?` | `number` |
|
|
33
|
+
| `input?` | `number` |
|
|
34
|
+
|
|
35
|
+
##### Returns
|
|
36
|
+
|
|
37
|
+
`AudioNode`
|
|
38
|
+
|
|
39
|
+
##### Inherited from
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
BaseAudioNode.connect
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Call Signature
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
connect(destinationParam, output?): void;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
##### Parameters
|
|
52
|
+
|
|
53
|
+
| Parameter | Type |
|
|
54
|
+
| ------ | ------ |
|
|
55
|
+
| `destinationParam` | `AudioParam` |
|
|
56
|
+
| `output?` | `number` |
|
|
57
|
+
|
|
58
|
+
##### Returns
|
|
59
|
+
|
|
60
|
+
`void`
|
|
61
|
+
|
|
62
|
+
##### Inherited from
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
BaseAudioNode.connect
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### disconnect()
|
|
71
|
+
|
|
72
|
+
#### Call Signature
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
disconnect(): void;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
|
|
79
|
+
|
|
80
|
+
##### Returns
|
|
81
|
+
|
|
82
|
+
`void`
|
|
83
|
+
|
|
84
|
+
##### Inherited from
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
BaseAudioNode.disconnect
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Call Signature
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
disconnect(output): void;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
##### Parameters
|
|
97
|
+
|
|
98
|
+
| Parameter | Type |
|
|
99
|
+
| ------ | ------ |
|
|
100
|
+
| `output` | `number` |
|
|
101
|
+
|
|
102
|
+
##### Returns
|
|
103
|
+
|
|
104
|
+
`void`
|
|
105
|
+
|
|
106
|
+
##### Inherited from
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
BaseAudioNode.disconnect
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Call Signature
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
disconnect(destinationNode): void;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
##### Parameters
|
|
119
|
+
|
|
120
|
+
| Parameter | Type |
|
|
121
|
+
| ------ | ------ |
|
|
122
|
+
| `destinationNode` | `AudioNode` |
|
|
123
|
+
|
|
124
|
+
##### Returns
|
|
125
|
+
|
|
126
|
+
`void`
|
|
127
|
+
|
|
128
|
+
##### Inherited from
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
BaseAudioNode.disconnect
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### Call Signature
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
disconnect(destinationNode, output): void;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
##### Parameters
|
|
141
|
+
|
|
142
|
+
| Parameter | Type |
|
|
143
|
+
| ------ | ------ |
|
|
144
|
+
| `destinationNode` | `AudioNode` |
|
|
145
|
+
| `output` | `number` |
|
|
146
|
+
|
|
147
|
+
##### Returns
|
|
148
|
+
|
|
149
|
+
`void`
|
|
150
|
+
|
|
151
|
+
##### Inherited from
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
BaseAudioNode.disconnect
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Call Signature
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
disconnect(
|
|
161
|
+
destinationNode,
|
|
162
|
+
output,
|
|
163
|
+
input): void;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
##### Parameters
|
|
167
|
+
|
|
168
|
+
| Parameter | Type |
|
|
169
|
+
| ------ | ------ |
|
|
170
|
+
| `destinationNode` | `AudioNode` |
|
|
171
|
+
| `output` | `number` |
|
|
172
|
+
| `input` | `number` |
|
|
173
|
+
|
|
174
|
+
##### Returns
|
|
175
|
+
|
|
176
|
+
`void`
|
|
177
|
+
|
|
178
|
+
##### Inherited from
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
BaseAudioNode.disconnect
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Call Signature
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
disconnect(destinationParam): void;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
##### Parameters
|
|
191
|
+
|
|
192
|
+
| Parameter | Type |
|
|
193
|
+
| ------ | ------ |
|
|
194
|
+
| `destinationParam` | `AudioParam` |
|
|
195
|
+
|
|
196
|
+
##### Returns
|
|
197
|
+
|
|
198
|
+
`void`
|
|
199
|
+
|
|
200
|
+
##### Inherited from
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
BaseAudioNode.disconnect
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### Call Signature
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
disconnect(destinationParam, output): void;
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
##### Parameters
|
|
213
|
+
|
|
214
|
+
| Parameter | Type |
|
|
215
|
+
| ------ | ------ |
|
|
216
|
+
| `destinationParam` | `AudioParam` |
|
|
217
|
+
| `output` | `number` |
|
|
218
|
+
|
|
219
|
+
##### Returns
|
|
220
|
+
|
|
221
|
+
`void`
|
|
222
|
+
|
|
223
|
+
##### Inherited from
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
BaseAudioNode.disconnect
|
|
227
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type | Description |
|
|
4
|
+
| ------ | ------ | ------ |
|
|
5
|
+
| <a id="canvas"></a> `canvas?` | `OffscreenCanvas` | The canvas element to bind textures to. This has to be set for GPU processing. The task will initialize a WebGL or WebGPU context and throw an error if this fails (e.g. if you have already initialized a different type of context). |
|
|
6
|
+
| <a id="segmentercanvas"></a> `segmenterCanvas?` | `OffscreenCanvas` | The Google TaskVision segmentation model only works with WebGl so we need a separate canvas for this. |
|
|
7
|
+
| <a id="modelasset"></a> `modelAsset?` | [`SegmentationModelAsset`](SegmentationModelAsset.mdx) | - |
|
|
8
|
+
| <a id="delegate"></a> `delegate?` | [`Delegate`](../type-aliases/Delegate.mdx) | Overrides the default backend to use for the provided model. |
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Wrapper for a mask produced by a Segmentation Task.
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Property | Modifier | Type | Description |
|
|
6
|
+
| ------ | ------ | ------ | ------ |
|
|
7
|
+
| <a id="canvas"></a> `canvas` | `readonly` | `OffscreenCanvas` \| `undefined` | Returns the canvas element that the mask is bound to. |
|
|
8
|
+
| <a id="width"></a> `width` | `readonly` | `number` | Returns the width of the mask. |
|
|
9
|
+
| <a id="height"></a> `height` | `readonly` | `number` | Returns the height of the mask. |
|
|
10
|
+
|
|
11
|
+
## Methods
|
|
12
|
+
|
|
13
|
+
### hasUint8Array()
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
hasUint8Array(): boolean;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Returns whether this `MPMask` contains a mask of type `Uint8Array`.
|
|
20
|
+
|
|
21
|
+
#### Returns
|
|
22
|
+
|
|
23
|
+
`boolean`
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### hasFloat32Array()
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
hasFloat32Array(): boolean;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Returns whether this `MPMask` contains a mask of type `Float32Array`.
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`boolean`
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### hasWebGLTexture()
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
hasWebGLTexture(): boolean;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Returns whether this `MPMask` contains a mask of type `WebGLTexture`.
|
|
48
|
+
|
|
49
|
+
#### Returns
|
|
50
|
+
|
|
51
|
+
`boolean`
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### getAsUint8Array()
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
getAsUint8Array(): Uint8Array;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Returns the underlying mask as a Uint8Array`. Note that this involves an
|
|
62
|
+
expensive GPU to CPU transfer if the current mask is only available as a
|
|
63
|
+
`WebGLTexture`.
|
|
64
|
+
|
|
65
|
+
#### Returns
|
|
66
|
+
|
|
67
|
+
`Uint8Array`
|
|
68
|
+
|
|
69
|
+
The current data as a Uint8Array.
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### getAsFloat32Array()
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
getAsFloat32Array(): Float32Array;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Returns the underlying mask as a single channel `Float32Array`. Note that
|
|
80
|
+
this involves an expensive GPU to CPU transfer if the current mask is
|
|
81
|
+
only available as a `WebGLTexture`.
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`Float32Array`
|
|
86
|
+
|
|
87
|
+
The current mask as a Float32Array.
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### getAsWebGLTexture()
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
getAsWebGLTexture(): WebGLTexture;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Returns the underlying mask as a `WebGLTexture` object. Note that this
|
|
98
|
+
involves a CPU to GPU transfer if the current mask is only available as
|
|
99
|
+
a CPU array. The returned texture is bound to the current canvas (see
|
|
100
|
+
`.canvas`).
|
|
101
|
+
|
|
102
|
+
#### Returns
|
|
103
|
+
|
|
104
|
+
`WebGLTexture`
|
|
105
|
+
|
|
106
|
+
The current mask as a WebGLTexture.
|
|
107
|
+
|
|
108
|
+
***
|
|
109
|
+
|
|
110
|
+
### clone()
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
clone(): MPMask;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Creates a copy of the resources stored in this `MPMask`. You can
|
|
117
|
+
invoke this method to extend the lifetime of a mask returned by a
|
|
118
|
+
MediaPipe Task. Note that performance critical applications should aim to
|
|
119
|
+
only use the `MPMask` within the MediaPipe Task callback so that
|
|
120
|
+
copies can be avoided.
|
|
121
|
+
|
|
122
|
+
#### Returns
|
|
123
|
+
|
|
124
|
+
`MPMask`
|
|
125
|
+
|
|
126
|
+
***
|
|
127
|
+
|
|
128
|
+
### close()
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
close(): void;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Frees up any resources owned by this `MPMask` instance.
|
|
135
|
+
|
|
136
|
+
Note that this method does not free masks that are owned by the C++
|
|
137
|
+
Task, as these are freed automatically once you leave the MediaPipe
|
|
138
|
+
callback. Additionally, some shared state is freed only once you invoke
|
|
139
|
+
the Task's `close()` method.
|
|
140
|
+
|
|
141
|
+
#### Returns
|
|
142
|
+
|
|
143
|
+
`void`
|
|
144
|
+
|
|
145
|
+
#### Export
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Extended by
|
|
2
|
+
|
|
3
|
+
- [`Segmenter`](Segmenter.mdx)
|
|
4
|
+
- [`Detector`](Detector.mdx)
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Type |
|
|
9
|
+
| ------ | ------ |
|
|
10
|
+
| <a id="status"></a> `status` | \| `"closed"` \| `"closing"` \| `"Error"` \| `"destroyed"` \| `"destroying"` \| `"idle"` \| `"new"` \| `"opened"` \| `"opening"` \| `"processing"` \| `"updated"` \| `"updating"` |
|
|
11
|
+
|
|
12
|
+
## Methods
|
|
13
|
+
|
|
14
|
+
### open()
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
open(): Promise<void>;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Returns
|
|
21
|
+
|
|
22
|
+
`Promise`\<`void`\>
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
### close()
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
close(): void;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Returns
|
|
33
|
+
|
|
34
|
+
`void`
|
|
35
|
+
|
|
36
|
+
***
|
|
37
|
+
|
|
38
|
+
### destroy()
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
destroy(): Promise<void>;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Returns
|
|
45
|
+
|
|
46
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Message event to initializing the Processor
|
|
2
|
+
|
|
3
|
+
## Type Parameters
|
|
4
|
+
|
|
5
|
+
| Type Parameter |
|
|
6
|
+
| ------ |
|
|
7
|
+
| `T` |
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type |
|
|
12
|
+
| ------ | ------ |
|
|
13
|
+
| <a id="type"></a> `type` | `"open"` |
|
|
14
|
+
| <a id="data"></a> `data` | `T` |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Message event to process the video frame
|
|
2
|
+
|
|
3
|
+
## Type Parameters
|
|
4
|
+
|
|
5
|
+
| Type Parameter |
|
|
6
|
+
| ------ |
|
|
7
|
+
| `T` |
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type |
|
|
12
|
+
| ------ | ------ |
|
|
13
|
+
| <a id="type"></a> `type` | `"process"` |
|
|
14
|
+
| <a id="data"></a> `data` | `T` |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Message event to update processor options
|
|
2
|
+
|
|
3
|
+
## Type Parameters
|
|
4
|
+
|
|
5
|
+
| Type Parameter |
|
|
6
|
+
| ------ |
|
|
7
|
+
| `T` |
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type |
|
|
12
|
+
| ------ | ------ |
|
|
13
|
+
| <a id="type"></a> `type` | `"update"` |
|
|
14
|
+
| <a id="data"></a> `data` | `T` |
|