@bevyra/avatar 1.0.8 → 1.0.10

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.
Files changed (3) hide show
  1. package/README.md +18 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -37,3 +37,21 @@ session.close(); client.close();
37
37
  ```
38
38
 
39
39
  Speech and idle JPEGs are composited over off-white `#F5F3EE` by default. Pass `{ background: '#FFFFFF' }` for a solid color, or `{ background: readFileSync('background.gif'), width: 720, height: 1280 }` for an image. JPEG, PNG, GIF and WebP buffers or data URLs are accepted; animated GIF and WebP loop through speech and idle. Images fill the requested dimensions by center cropping while the avatar keeps its aspect ratio. Images must be 64–4096 pixels per side and at most 8 MiB; animation is limited to 300 frames and 30 seconds. Output dimensions must be 160–1920 pixels per side and at most 2.07 megapixels. Other local processes can use `url` and `token` to connect to the loopback WebSocket. Keep the token private. `npx bevyra-avatar serve` prints them as JSON. Send complete speech units with natural pauses; `session.interrupt` cancels the current generation. See the [Python package protocol](../avatar-python/README.md).
40
+
41
+ ```js
42
+ import { readFileSync } from 'node:fs';
43
+
44
+ // Choose one background; omit the option for off-white.
45
+ const backgrounds = {
46
+ color: '#FFFFFF',
47
+ jpeg: readFileSync('background.jpg'),
48
+ png: readFileSync('background.png'),
49
+ gif: readFileSync('background.gif'),
50
+ webp: readFileSync('background.webp'),
51
+ };
52
+ const session = await client.connect('noora', {
53
+ background: backgrounds.gif, width: 720, height: 1280,
54
+ }); // GIF and animated WebP loop during speech and idle.
55
+ ```
56
+
57
+ When an inference update requires a newer SDK, the service returns HTTP 426 `sdk_update_required`. Run `npm install @bevyra/avatar@latest` and restart the local renderer. The Node package pins a matching Python renderer; cached avatars remain in place.
package/index.js CHANGED
@@ -6,7 +6,7 @@ import path from "node:path";
6
6
  import readline from "node:readline";
7
7
  import WebSocket from "ws";
8
8
 
9
- const VERSION = "1.0.8";
9
+ const VERSION = "1.0.10";
10
10
 
11
11
  function backgroundValue(value) {
12
12
  if (value == null || typeof value === "string") return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bevyra/avatar",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "API-authorized local BeVyra avatar service for Node.js",
5
5
  "homepage": "https://bevyra.ai/docs",
6
6
  "bugs": {"url": "https://bevyra.ai/docs"},