@picovoice/eagle-web 1.0.0 → 2.0.0

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
@@ -8,10 +8,10 @@ Eagle is an on-device speaker recognition engine. Eagle is:
8
8
 
9
9
  - Private; All voice processing runs locally.
10
10
  - Cross-Platform:
11
- - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
11
+ - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
12
12
  - Android and iOS
13
13
  - Chrome, Safari, Firefox, and Edge
14
- - Raspberry Pi (4, 3) and NVIDIA Jetson Nano
14
+ - Raspberry Pi (3, 4, 5)
15
15
 
16
16
  ## Compatibility
17
17
 
@@ -19,11 +19,28 @@ Eagle is an on-device speaker recognition engine. Eagle is:
19
19
  - Firefox
20
20
  - Safari
21
21
 
22
+ ## Requirements
23
+
24
+ The Eagle Web Binding uses [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer).
25
+
26
+ Include the following headers in the response to enable the use of `SharedArrayBuffers`:
27
+
28
+ ```
29
+ Cross-Origin-Opener-Policy: same-origin
30
+ Cross-Origin-Embedder-Policy: require-corp
31
+ ```
32
+
33
+ Refer to our [Web demo](../../demo/web) for an example on creating a server with the corresponding response headers.
34
+
35
+ Browsers that don't support `SharedArrayBuffers` or applications that don't include the required headers will fall back to using standard `ArrayBuffers`. This will disable multithreaded processing.
36
+
22
37
  ### Restrictions
23
38
 
24
39
  IndexedDB is required to use `Eagle` in a worker thread. Browsers without IndexedDB support
25
40
  (i.e. Firefox Incognito Mode) should use `Eagle` in the main thread.
26
41
 
42
+ Multi-threading is only enabled for Eagle when using on a web worker.
43
+
27
44
  ## Installation
28
45
 
29
46
  Using `yarn`:
@@ -88,7 +105,7 @@ function getAudioData(numSamples): Int16Array {
88
105
  let percentage = 0;
89
106
  while (percentage < 100) {
90
107
  const audioData = getAudioData(eagleProfiler.minEnrollSamples);
91
-
108
+
92
109
  const result: EagleProfilerEnrollResult = await eagleProfiler.enroll(audioData);
93
110
  if (result.feedback === EagleProfilerEnrollFeedback.AUDIO_OK) {
94
111
  // audio is good!