@mediapipe/tasks-audio 0.10.0 → 0.10.2-rc1
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/README.md +8 -6
- package/audio_bundle.cjs +2 -0
- package/audio_bundle.cjs.map +1 -0
- package/{audio_bundle.js → audio_bundle.mjs} +2 -1
- package/audio_bundle.mjs.map +1 -0
- package/package.json +5 -2
- package/wasm/audio_wasm_internal.wasm +0 -0
- package/wasm/audio_wasm_nosimd_internal.wasm +0 -0
- package/wasm/audio_wasm_internal.js +0 -6302
- package/wasm/audio_wasm_nosimd_internal.js +0 -6302
package/README.md
CHANGED
|
@@ -2,30 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains the audio tasks for MediaPipe.
|
|
4
4
|
|
|
5
|
-
## Audio
|
|
5
|
+
## Audio Classifier
|
|
6
6
|
|
|
7
|
-
The MediaPipe Audio
|
|
7
|
+
The MediaPipe Audio Classifier task performs classification on audio data.
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
const audio = await FilesetResolver.forAudioTasks(
|
|
11
|
-
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-audio
|
|
11
|
+
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-audio/wasm"
|
|
12
12
|
);
|
|
13
13
|
const audioClassifier = await AudioClassifier.createFromModelPath(audio,
|
|
14
|
-
"https://storage.googleapis.com/mediapipe-
|
|
14
|
+
"https://storage.googleapis.com/mediapipe-models/audio_classifier/yamnet/float32/1/yamnet.tflite
|
|
15
15
|
);
|
|
16
16
|
const classifications = audioClassifier.classify(audioData);
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
For more information, refer to the [Audio Classifier](https://developers.google.com/mediapipe/solutions/audio/audio_classifier/web_js) documentation.
|
|
20
|
+
|
|
19
21
|
## Audio Embedding
|
|
20
22
|
|
|
21
23
|
The MediaPipe Audio Embedding task extracts embeddings from audio data.
|
|
22
24
|
|
|
23
25
|
```
|
|
24
26
|
const audio = await FilesetResolver.forAudioTasks(
|
|
25
|
-
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-audio
|
|
27
|
+
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-audio/wasm"
|
|
26
28
|
);
|
|
27
29
|
const audioEmbedder = await AudioEmbedder.createFromModelPath(audio,
|
|
28
|
-
"
|
|
30
|
+
"https://storage.googleapis.com/mediapipe-assets/yamnet_embedding_metadata.tflite?generation=1668295071595506"
|
|
29
31
|
);
|
|
30
32
|
const embeddings = audioEmbedder.embed(audioData);
|
|
31
33
|
```
|