@sekyro/react 0.1.0-rc.3 → 0.1.0-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyro/react",
3
- "version": "0.1.0-rc.3",
3
+ "version": "0.1.0-rc.4",
4
4
  "description": "Sekyro React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -47,12 +47,10 @@
47
47
  }
48
48
  },
49
49
  "./styles.css": "./dist/styles.css",
50
- "./assets/*": "./assets/*",
51
50
  "./package.json": "./package.json"
52
51
  },
53
52
  "files": [
54
53
  "dist",
55
- "assets",
56
54
  "README.md",
57
55
  "CHANGELOG.md",
58
56
  "LICENSE"
@@ -61,13 +59,13 @@
61
59
  "build": "tsup",
62
60
  "test": "node scripts/check-css.mjs && vitest run",
63
61
  "size": "node scripts/check-size.mjs",
64
- "voice:generate": "node --experimental-strip-types scripts/generate-voice-clips.mts",
62
+ "voice:texts": "node --experimental-strip-types scripts/export-voice-texts.mts",
65
63
  "typecheck": "tsc --noEmit",
66
64
  "api:report": "api-extractor run --local",
67
65
  "api:check": "api-extractor run"
68
66
  },
69
67
  "peerDependencies": {
70
- "@sekyro/web": "^0.1.0-rc.5",
68
+ "@sekyro/web": "^0.1.0-rc.6",
71
69
  "react": ">=18.2",
72
70
  "react-dom": ">=18.2"
73
71
  },
@@ -1,60 +0,0 @@
1
- # Voice-guidance clips — set `v1`
2
-
3
- Pre-recorded neural-voice MP3s that `@sekyro/react` plays for the gate guidance
4
- (`fcv3.*` hints) during a liveness capture. A key without a clip falls back to
5
- the browser's speechSynthesis (when the voice options allow it for the locale).
6
-
7
- ## Layout
8
-
9
- ```
10
- assets/audio/v1/
11
- manifest.json { "set": "v1", "clips": { "<loc>": { "<name>": { "sha256", "text", "bytes" } } } }
12
- ar/<name>.mp3 <name> = last segment of the fcv3.* key, e.g. center_face.mp3
13
- fr/<name>.mp3
14
- ```
15
-
16
- The 9 keys: `no_face`, `come_closer`, `move_back`, `center_face`, `straighten`,
17
- `more_light`, `too_bright`, `hold_still`, `steady_camera`. English never ships
18
- clips (it always uses speechSynthesis).
19
-
20
- `src/voice/clip-manifest.ts` is generated alongside: the same manifest shape,
21
- trimmed to the clip names (`BUNDLED_CLIP_MANIFEST`). The default clip source is
22
- `createManifestResolver(BUNDLED_CLIP_MANIFEST, clipBaseUrl)`, so a key without a
23
- shipped clip goes straight to the fallback with no 404 round-trip. An empty
24
- manifest (`"clips": { "ar": {}, "fr": {} }`) means the package ships TTS-only.
25
-
26
- Clips hosted elsewhere (CDN / object storage) plug in through `voice.clips` —
27
- either a `(key, locale) → url | null` resolver or a `{ [locale]: { [voiceKey]: url } }`
28
- map (e.g. delivered by the backend), or `createManifestResolver(manifest, baseUrl)`
29
- over a manifest of this shape served next to the clips.
30
-
31
- Hosts serve this directory at `<clipBaseUrl>` — by default
32
- `${assetBaseUrl ?? "/models-v3"}/audio/v1` — next to the vendored models.
33
-
34
- ## Voice
35
-
36
- - Provider: Azure Speech neural TTS (REST), output `audio-24khz-48kbitrate-mono-mp3`
37
- - Arabic: `ar-SA-ZariyahNeural` (MSA) · French: `fr-FR-DeniseNeural`
38
- - SSML `<prosody rate="-5%">`
39
- - Spoken text: verbatim from `src/strings/{ar,fr}.ts`
40
-
41
- ## Regenerating
42
-
43
- The credential lives only in your shell env — never in a file, commit or log.
44
-
45
- ```sh
46
- cd packages/sekyro-react
47
- export AZURE_SPEECH_KEY=… # from the vault
48
- export AZURE_SPEECH_REGION=westeurope
49
- npm run voice:generate -- --dry-run # print the plan (no network)
50
- npm run voice:generate # write the MP3s + both manifests
51
- ```
52
-
53
- Swapping providers means replacing the single `synthesize(text, locale)`
54
- function in `scripts/generate-voice-clips.mts`.
55
-
56
- ## Cache-busting rule
57
-
58
- Clips are served with immutable caching. **A new voice or any new text means a
59
- new set directory** (`assets/audio/v2/`) and a bump of the `SET` constant in the
60
- generator (it becomes `BUNDLED_CLIP_MANIFEST.set`). Never overwrite the MP3s of a published set.
@@ -1,7 +0,0 @@
1
- {
2
- "set": "v1",
3
- "clips": {
4
- "ar": {},
5
- "fr": {}
6
- }
7
- }