@sorisdk/matcher 0.1.0 → 0.1.1

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 CHANGED
@@ -1,23 +1,43 @@
1
1
  # @sorisdk/matcher
2
2
 
3
- High-level browser/worker matcher session wrapper for the NADA wasm matcher runtime.
3
+ WebAssembly package for matching fingerprint bytes against pack data in the browser.
4
4
 
5
- ## API
5
+ Most web integrations should use `@sorisdk/web-audio` for a simpler end-to-end flow. This package is intended for lower-level cases where you want to control fingerprint generation and matching yourself.
6
+
7
+ Public integration guide: https://docs.soriapi.com/ko/integration/web
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @sorisdk/matcher
13
+ ```
14
+
15
+ Vite-based apps need `vite-plugin-wasm`.
16
+
17
+ ## Minimal example
6
18
 
7
19
  ```ts
8
20
  import { MatcherSession, AudioFingerprintType, initMatcher } from "@sorisdk/matcher";
9
21
 
10
22
  await initMatcher();
23
+
11
24
  const session = new MatcherSession();
12
25
  await session.ready();
13
26
 
14
- await session.addEntry("track-1", AudioFingerprintType.Livestream, new Uint8Array([1, 2, 3]));
15
- const results = await session.match(new Uint8Array([1, 2, 3]));
27
+ await session.addEntry(
28
+ "demo-track",
29
+ AudioFingerprintType.Livestream,
30
+ new Uint8Array([1, 2, 3])
31
+ );
32
+
33
+ const result = await session.match(new Uint8Array([1, 2, 3]));
34
+
35
+ console.log(result.best);
16
36
  ```
17
37
 
18
- ### Pack loading
38
+ ## Pack loading
19
39
 
20
- `loadPack` accepts:
40
+ `loadPack(...)` accepts:
21
41
 
22
42
  - `Uint8Array`
23
43
  - `ArrayBuffer`
@@ -27,30 +47,4 @@ const results = await session.match(new Uint8Array([1, 2, 3]));
27
47
  - `string`
28
48
  - `URL`
29
49
 
30
- String/URL/Request sources use `fetch`.
31
-
32
- When you call `loadPack(...)`, the matcher package first performs an internal baseline-model load
33
- step, then applies your account/material pack. This internal step is hidden from callers; the
34
- public flow stays `initMatcher(...)` then `session.loadPack(yourPackSource)`.
35
-
36
- ### Events
37
-
38
- - `ready`
39
- - `packloadstart`
40
- - `packload`
41
- - `querystart`
42
- - `match`
43
- - `nomatch`
44
- - `error`
45
- - `destroy`
46
-
47
- ## Testing
48
-
49
- ```bash
50
- pnpm --dir packages/matcher test
51
- ```
52
-
53
- ## Notes
54
-
55
- - This package build emits wasm-bindgen output into `dist/generated/`.
56
- - The same public API works on the main thread and in Dedicated Workers.
50
+ If you want campaign events and browser recognition flow on top of matching, use `@sorisdk/web-audio`.
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sorisdk/matcher",
3
- "version": "0.1.0",
4
- "description": "Browser-friendly WASM matcher session for NADA",
3
+ "version": "0.1.1",
4
+ "description": "Browser WASM SDK for audio fingerprint matching",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -31,15 +31,7 @@
31
31
  ],
32
32
  "author": "comfuture",
33
33
  "license": "MIT",
34
- "repository": {
35
- "type": "git",
36
- "url": "git+https://github.com/iplateia/nada.git",
37
- "directory": "packages/matcher"
38
- },
39
- "homepage": "https://github.com/iplateia/nada/tree/main/packages/matcher",
40
- "bugs": {
41
- "url": "https://github.com/iplateia/nada/issues"
42
- },
34
+ "homepage": "https://docs.soriapi.com/ko/integration/web",
43
35
  "devDependencies": {
44
36
  "tsup": "^8.5.0",
45
37
  "typescript": "^5.8.3",