@sorisdk/web-audio 0.1.1 → 0.1.3
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/LICENSE.md +50 -0
- package/README.md +26 -0
- package/dist/default-loader.js +5 -0
- package/dist/generated/window.js +1 -1
- package/dist/generated/window_bg.js +19 -19
- package/dist/generated/window_bg.wasm +0 -0
- package/dist/index.js +2 -5
- package/package.json +5 -5
package/LICENSE.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Software Use License Agreement
|
|
2
|
+
|
|
3
|
+
Copyright (c) iPlateia Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This Software Use License Agreement ("Agreement") is a binding agreement between iPlateia Inc. ("Company") and the person or entity that installs, accesses, or uses this package ("Licensee").
|
|
6
|
+
|
|
7
|
+
By installing, copying, accessing, or using the package, Licensee agrees to be bound by this Agreement. If Licensee does not agree, Licensee must not install, access, or use the package.
|
|
8
|
+
|
|
9
|
+
1. Grant of License
|
|
10
|
+
|
|
11
|
+
Subject to Licensee's full compliance with this Agreement, the Company grants Licensee a limited, non-exclusive, non-transferable, non-sublicensable, revocable license to use the package in object code or compiled form solely for Licensee's internal business use or other use expressly authorized by the Company.
|
|
12
|
+
|
|
13
|
+
2. Restrictions
|
|
14
|
+
|
|
15
|
+
Licensee must not, and must not permit any third party to:
|
|
16
|
+
|
|
17
|
+
- modify, adapt, translate, alter, or create derivative works of the package;
|
|
18
|
+
- reverse engineer, decompile, disassemble, decode, or otherwise attempt to derive the source code, underlying ideas, algorithms, file formats, or trade secrets of the package, except to the limited extent such restriction is prohibited by mandatory law;
|
|
19
|
+
- copy, publish, distribute, transmit, disclose, sublicense, assign, sell, rent, lease, lend, transfer, pledge, or otherwise make the package available to any third party;
|
|
20
|
+
- remove, obscure, or alter any copyright, trademark, confidentiality, or proprietary notice contained in the package;
|
|
21
|
+
- use the package in violation of applicable law, public policy, or the Company's usage conditions;
|
|
22
|
+
- use the package to disclose survey content, logs, technical information, or other service-related information to any third party.
|
|
23
|
+
|
|
24
|
+
3. Ownership and Reservation of Rights
|
|
25
|
+
|
|
26
|
+
The package is licensed, not sold. The package, including all intellectual property rights in and to the package, remains the exclusive property of the Company and its licensors. No rights are granted except as expressly stated in this Agreement.
|
|
27
|
+
|
|
28
|
+
4. Confidentiality
|
|
29
|
+
|
|
30
|
+
Any non-public information obtained through access to or use of the package, including technical materials, performance information, documentation, data formats, and service-related content, is confidential. Licensee must keep such information strictly confidential and must not disclose it to any third party without the Company's prior written consent.
|
|
31
|
+
|
|
32
|
+
5. Changes, Suspension, and Termination
|
|
33
|
+
|
|
34
|
+
The Company may modify, suspend, restrict, or discontinue all or part of the package at any time if reasonably required for operational, technical, security, or business reasons. If Licensee breaches this Agreement, the Company may immediately suspend or terminate this Agreement and Licensee's right to use the package. Upon termination, Licensee must immediately stop using the package and delete all copies in Licensee's possession or control.
|
|
35
|
+
|
|
36
|
+
6. Disclaimer
|
|
37
|
+
|
|
38
|
+
To the maximum extent permitted by law, the package is provided on an "as is" and "as available" basis without warranties of any kind, whether express, implied, statutory, or otherwise, including any implied warranties of merchantability, fitness for a particular purpose, title, non-infringement, accuracy, availability, or uninterrupted operation.
|
|
39
|
+
|
|
40
|
+
7. Limitation of Liability
|
|
41
|
+
|
|
42
|
+
To the maximum extent permitted by law, the Company will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages, or for any loss of profits, revenues, business, goodwill, data, or use, arising out of or related to this Agreement or the package, even if advised of the possibility of such damages.
|
|
43
|
+
|
|
44
|
+
8. Governing Law
|
|
45
|
+
|
|
46
|
+
This Agreement is governed by the laws of the Republic of Korea, without regard to conflict of laws principles.
|
|
47
|
+
|
|
48
|
+
9. Entire Agreement
|
|
49
|
+
|
|
50
|
+
This Agreement constitutes the entire agreement between Licensee and the Company regarding the package and supersedes all prior or contemporaneous understandings relating to the package.
|
package/README.md
CHANGED
|
@@ -29,6 +29,8 @@ export default {
|
|
|
29
29
|
};
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
The default wasm initialization path is intended to work in both Vite dev/build and Nuxt client production bundles without extra loader patching.
|
|
33
|
+
|
|
32
34
|
## Minimal example
|
|
33
35
|
|
|
34
36
|
```ts
|
|
@@ -68,6 +70,30 @@ await recognizer.stop();
|
|
|
68
70
|
await recognizer.destroy();
|
|
69
71
|
```
|
|
70
72
|
|
|
73
|
+
## Advanced wasm loading overrides
|
|
74
|
+
|
|
75
|
+
If you need to pin explicit generated modules, use the nested `wasm` options:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { AudioRecognizer } from "@sorisdk/web-audio";
|
|
79
|
+
|
|
80
|
+
const recognizer = new AudioRecognizer({
|
|
81
|
+
appId: "YOUR_APP_ID",
|
|
82
|
+
ephemeralKey: async () => "YOUR_EPHEMERAL_KEY",
|
|
83
|
+
wasm: {
|
|
84
|
+
afpgen: {
|
|
85
|
+
loader: () => import("@sorisdk/afpgen/generated/core.js")
|
|
86
|
+
},
|
|
87
|
+
matcher: {
|
|
88
|
+
loader: () => import("@sorisdk/matcher/generated/core.js")
|
|
89
|
+
},
|
|
90
|
+
matchWindow: {
|
|
91
|
+
loader: () => import("@sorisdk/web-audio/generated/window.js")
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
71
97
|
## Integration flow
|
|
72
98
|
|
|
73
99
|
1. Prepare your `appId` and ephemeral key flow.
|
package/dist/generated/window.js
CHANGED
|
@@ -51,11 +51,11 @@ export class WasmFingerprintMatchWindow {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
if (Symbol.dispose) WasmFingerprintMatchWindow.prototype[Symbol.dispose] = WasmFingerprintMatchWindow.prototype.free;
|
|
54
|
-
export function
|
|
54
|
+
export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
|
|
55
55
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
56
56
|
return ret;
|
|
57
57
|
}
|
|
58
|
-
export function
|
|
58
|
+
export function __wbg_Number_32bf70a599af1d4b(arg0) {
|
|
59
59
|
const ret = Number(arg0);
|
|
60
60
|
return ret;
|
|
61
61
|
}
|
|
@@ -66,46 +66,46 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
66
66
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
67
67
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
68
68
|
}
|
|
69
|
-
export function
|
|
69
|
+
export function __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff(arg0) {
|
|
70
70
|
const v = arg0;
|
|
71
71
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
72
72
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
73
73
|
}
|
|
74
|
-
export function
|
|
74
|
+
export function __wbg___wbindgen_debug_string_ab4b34d23d6778bd(arg0, arg1) {
|
|
75
75
|
const ret = debugString(arg1);
|
|
76
76
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
77
77
|
const len1 = WASM_VECTOR_LEN;
|
|
78
78
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
79
79
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
80
80
|
}
|
|
81
|
-
export function
|
|
81
|
+
export function __wbg___wbindgen_in_a5d8b22e52b24dd1(arg0, arg1) {
|
|
82
82
|
const ret = arg0 in arg1;
|
|
83
83
|
return ret;
|
|
84
84
|
}
|
|
85
|
-
export function
|
|
85
|
+
export function __wbg___wbindgen_is_null_52ff4ec04186736f(arg0) {
|
|
86
86
|
const ret = arg0 === null;
|
|
87
87
|
return ret;
|
|
88
88
|
}
|
|
89
|
-
export function
|
|
89
|
+
export function __wbg___wbindgen_is_object_63322ec0cd6ea4ef(arg0) {
|
|
90
90
|
const val = arg0;
|
|
91
91
|
const ret = typeof(val) === 'object' && val !== null;
|
|
92
92
|
return ret;
|
|
93
93
|
}
|
|
94
|
-
export function
|
|
94
|
+
export function __wbg___wbindgen_is_undefined_29a43b4d42920abd(arg0) {
|
|
95
95
|
const ret = arg0 === undefined;
|
|
96
96
|
return ret;
|
|
97
97
|
}
|
|
98
|
-
export function
|
|
98
|
+
export function __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c(arg0, arg1) {
|
|
99
99
|
const ret = arg0 == arg1;
|
|
100
100
|
return ret;
|
|
101
101
|
}
|
|
102
|
-
export function
|
|
102
|
+
export function __wbg___wbindgen_number_get_c7f42aed0525c451(arg0, arg1) {
|
|
103
103
|
const obj = arg1;
|
|
104
104
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
105
105
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
106
106
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
107
107
|
}
|
|
108
|
-
export function
|
|
108
|
+
export function __wbg___wbindgen_string_get_7ed5322991caaec5(arg0, arg1) {
|
|
109
109
|
const obj = arg1;
|
|
110
110
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
111
111
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -113,14 +113,14 @@ export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
|
|
|
113
113
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
114
114
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
115
115
|
}
|
|
116
|
-
export function
|
|
116
|
+
export function __wbg___wbindgen_throw_6b64449b9b9ed33c(arg0, arg1) {
|
|
117
117
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
118
118
|
}
|
|
119
119
|
export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
120
120
|
const ret = arg0[arg1];
|
|
121
121
|
return ret;
|
|
122
122
|
}
|
|
123
|
-
export function
|
|
123
|
+
export function __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3(arg0) {
|
|
124
124
|
let result;
|
|
125
125
|
try {
|
|
126
126
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -130,7 +130,7 @@ export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
|
|
|
130
130
|
const ret = result;
|
|
131
131
|
return ret;
|
|
132
132
|
}
|
|
133
|
-
export function
|
|
133
|
+
export function __wbg_instanceof_Uint8Array_152ba1f289edcf3f(arg0) {
|
|
134
134
|
let result;
|
|
135
135
|
try {
|
|
136
136
|
result = arg0 instanceof Uint8Array;
|
|
@@ -140,23 +140,23 @@ export function __wbg_instanceof_Uint8Array_740438561a5b956d(arg0) {
|
|
|
140
140
|
const ret = result;
|
|
141
141
|
return ret;
|
|
142
142
|
}
|
|
143
|
-
export function
|
|
143
|
+
export function __wbg_isSafeInteger_4fc213d1989d6d2a(arg0) {
|
|
144
144
|
const ret = Number.isSafeInteger(arg0);
|
|
145
145
|
return ret;
|
|
146
146
|
}
|
|
147
|
-
export function
|
|
147
|
+
export function __wbg_length_9f1775224cf1d815(arg0) {
|
|
148
148
|
const ret = arg0.length;
|
|
149
149
|
return ret;
|
|
150
150
|
}
|
|
151
|
-
export function
|
|
151
|
+
export function __wbg_new_0c7403db6e782f19(arg0) {
|
|
152
152
|
const ret = new Uint8Array(arg0);
|
|
153
153
|
return ret;
|
|
154
154
|
}
|
|
155
|
-
export function
|
|
155
|
+
export function __wbg_new_from_slice_b5ea43e23f6008c0(arg0, arg1) {
|
|
156
156
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
157
157
|
return ret;
|
|
158
158
|
}
|
|
159
|
-
export function
|
|
159
|
+
export function __wbg_prototypesetcall_a6b02eb00b0f4ce2(arg0, arg1, arg2) {
|
|
160
160
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
161
161
|
}
|
|
162
162
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -193,11 +193,8 @@ function getCallable(obj, names) {
|
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
195
|
var defaultLoader = async () => {
|
|
196
|
-
const
|
|
197
|
-
return
|
|
198
|
-
/* @vite-ignore */
|
|
199
|
-
generatedModuleUrl.href
|
|
200
|
-
);
|
|
196
|
+
const loaderModule = await import("./default-loader.js");
|
|
197
|
+
return loaderModule.default();
|
|
201
198
|
};
|
|
202
199
|
var WrappedFingerprintMatchWindow = class {
|
|
203
200
|
constructor(inner) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sorisdk/web-audio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Web SDK for browser-based audio recognition with SORI API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"matcher"
|
|
32
32
|
],
|
|
33
33
|
"author": "comfuture",
|
|
34
|
-
"license": "
|
|
34
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
35
35
|
"homepage": "https://docs.soriapi.com/ko/integration/web",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@sorisdk/afpgen": "0.1.
|
|
38
|
-
"@sorisdk/matcher": "0.1.
|
|
37
|
+
"@sorisdk/afpgen": "0.1.3",
|
|
38
|
+
"@sorisdk/matcher": "0.1.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"tsup": "^8.5.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build:wasm": "node ../../scripts/build-wasm-package.mjs web-audio",
|
|
47
|
-
"build": "tsup src/index.ts --format esm --dts && pnpm run build:wasm",
|
|
47
|
+
"build": "tsup src/index.ts --format esm --dts && pnpm run build:wasm && node ../../scripts/write-default-loader.mjs packages/web-audio ./generated/window.js",
|
|
48
48
|
"test": "vitest run",
|
|
49
49
|
"test:watch": "vitest"
|
|
50
50
|
}
|