@voqalize/avatar 0.4.1 → 0.4.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.
Files changed (203) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/README.md +26 -95
  3. package/assets/README.md +30 -18
  4. package/assets/tanvi.glb +0 -0
  5. package/assets/tanya.glb +0 -0
  6. package/assets/tara.glb +0 -0
  7. package/assets/tess.glb +0 -0
  8. package/assets/tushar.glb +0 -0
  9. package/client/internal.ts +24 -0
  10. package/client/supports.ts +6 -7
  11. package/client/three/assets.ts +7 -3
  12. package/client/three/budgets.ts +1 -1
  13. package/client/three/{tara-rig.ts → character-rig.ts} +682 -540
  14. package/client/three/createCharacter.ts +109 -0
  15. package/client/three/holds.ts +8 -3
  16. package/client/three/internal.ts +8 -7
  17. package/client/three/motion-limits.json +10 -2
  18. package/client/three/sequences.ts +5 -5
  19. package/client/three/tanvi-asset.ts +6 -0
  20. package/client/three/tanvi.ts +30 -0
  21. package/client/three/tanya.ts +18 -58
  22. package/client/three/tara.ts +19 -60
  23. package/client/three/tess-asset.ts +6 -0
  24. package/client/three/tess.ts +30 -0
  25. package/client/three/tushar.ts +18 -55
  26. package/dist/internal.d.ts +2 -2
  27. package/dist/internal.d.ts.map +1 -1
  28. package/dist/internal.js +16 -1
  29. package/dist/internal.js.map +1 -1
  30. package/dist/supports.d.ts +6 -7
  31. package/dist/supports.d.ts.map +1 -1
  32. package/dist/supports.js +6 -7
  33. package/dist/supports.js.map +1 -1
  34. package/dist/three/assets.d.ts +2 -0
  35. package/dist/three/assets.d.ts.map +1 -1
  36. package/dist/three/assets.js +7 -3
  37. package/dist/three/assets.js.map +1 -1
  38. package/dist/three/budgets.d.ts +1 -1
  39. package/dist/three/budgets.js +1 -1
  40. package/dist/three/character-rig.d.ts +366 -0
  41. package/dist/three/character-rig.d.ts.map +1 -0
  42. package/dist/three/{tara-rig.js → character-rig.js} +633 -526
  43. package/dist/three/character-rig.js.map +1 -0
  44. package/dist/three/createCharacter.d.ts +60 -0
  45. package/dist/three/createCharacter.d.ts.map +1 -0
  46. package/dist/three/createCharacter.js +84 -0
  47. package/dist/three/createCharacter.js.map +1 -0
  48. package/dist/three/holds.d.ts +7 -2
  49. package/dist/three/holds.d.ts.map +1 -1
  50. package/dist/three/holds.js +8 -3
  51. package/dist/three/holds.js.map +1 -1
  52. package/dist/three/internal.d.ts +7 -7
  53. package/dist/three/internal.d.ts.map +1 -1
  54. package/dist/three/internal.js +6 -6
  55. package/dist/three/internal.js.map +1 -1
  56. package/dist/three/motion-limits.json +10 -2
  57. package/dist/three/sequences.d.ts +5 -5
  58. package/dist/three/sequences.js +5 -5
  59. package/dist/three/tanvi-asset.d.ts +7 -0
  60. package/dist/three/tanvi-asset.d.ts.map +1 -0
  61. package/dist/three/tanvi-asset.js +7 -0
  62. package/dist/three/tanvi-asset.js.map +1 -0
  63. package/dist/three/tanvi.d.ts +24 -0
  64. package/dist/three/tanvi.d.ts.map +1 -0
  65. package/dist/three/tanvi.js +24 -0
  66. package/dist/three/tanvi.js.map +1 -0
  67. package/dist/three/tanya.d.ts +16 -28
  68. package/dist/three/tanya.d.ts.map +1 -1
  69. package/dist/three/tanya.js +15 -43
  70. package/dist/three/tanya.js.map +1 -1
  71. package/dist/three/tara.d.ts +17 -22
  72. package/dist/three/tara.d.ts.map +1 -1
  73. package/dist/three/tara.js +16 -45
  74. package/dist/three/tara.js.map +1 -1
  75. package/dist/three/tess-asset.d.ts +7 -0
  76. package/dist/three/tess-asset.d.ts.map +1 -0
  77. package/dist/three/tess-asset.js +7 -0
  78. package/dist/three/tess-asset.js.map +1 -0
  79. package/dist/three/tess.d.ts +24 -0
  80. package/dist/three/tess.d.ts.map +1 -0
  81. package/dist/three/tess.js +24 -0
  82. package/dist/three/tess.js.map +1 -0
  83. package/dist/three/tushar.d.ts +16 -25
  84. package/dist/three/tushar.d.ts.map +1 -1
  85. package/dist/three/tushar.js +15 -40
  86. package/dist/three/tushar.js.map +1 -1
  87. package/package.json +10 -49
  88. package/src/avatar.d.ts +67 -2
  89. package/src/avatar.js +131 -255
  90. package/src/faces.js +1 -1
  91. package/src/gaze.js +20 -47
  92. package/src/idle.js +69 -27
  93. package/src/prosody.js +109 -15
  94. package/src/rig.d.ts +7 -0
  95. package/src/speech-timing.js +9 -0
  96. package/src/visemes.js +107 -13
  97. package/client/arjun.ts +0 -26
  98. package/client/createCanvasAvatar.ts +0 -72
  99. package/client/interviewer-female.ts +0 -4
  100. package/client/interviewer-male.ts +0 -4
  101. package/client/ishita.ts +0 -26
  102. package/client/kabir.ts +0 -26
  103. package/client/meera.ts +0 -26
  104. package/client/naina.ts +0 -26
  105. package/client/professional-female-a.ts +0 -4
  106. package/client/professional-female-b.ts +0 -4
  107. package/client/professional-male-a.ts +0 -4
  108. package/client/professional-male-b.ts +0 -4
  109. package/client/vikram.ts +0 -26
  110. package/dist/arjun.d.ts +0 -7
  111. package/dist/arjun.d.ts.map +0 -1
  112. package/dist/arjun.js +0 -20
  113. package/dist/arjun.js.map +0 -1
  114. package/dist/createCanvasAvatar.d.ts +0 -22
  115. package/dist/createCanvasAvatar.d.ts.map +0 -1
  116. package/dist/createCanvasAvatar.js +0 -47
  117. package/dist/createCanvasAvatar.js.map +0 -1
  118. package/dist/interviewer-female.d.ts +0 -4
  119. package/dist/interviewer-female.d.ts.map +0 -1
  120. package/dist/interviewer-female.js +0 -3
  121. package/dist/interviewer-female.js.map +0 -1
  122. package/dist/interviewer-male.d.ts +0 -4
  123. package/dist/interviewer-male.d.ts.map +0 -1
  124. package/dist/interviewer-male.js +0 -3
  125. package/dist/interviewer-male.js.map +0 -1
  126. package/dist/ishita.d.ts +0 -7
  127. package/dist/ishita.d.ts.map +0 -1
  128. package/dist/ishita.js +0 -20
  129. package/dist/ishita.js.map +0 -1
  130. package/dist/kabir.d.ts +0 -7
  131. package/dist/kabir.d.ts.map +0 -1
  132. package/dist/kabir.js +0 -20
  133. package/dist/kabir.js.map +0 -1
  134. package/dist/meera.d.ts +0 -7
  135. package/dist/meera.d.ts.map +0 -1
  136. package/dist/meera.js +0 -20
  137. package/dist/meera.js.map +0 -1
  138. package/dist/naina.d.ts +0 -7
  139. package/dist/naina.d.ts.map +0 -1
  140. package/dist/naina.js +0 -20
  141. package/dist/naina.js.map +0 -1
  142. package/dist/professional-female-a.d.ts +0 -4
  143. package/dist/professional-female-a.d.ts.map +0 -1
  144. package/dist/professional-female-a.js +0 -3
  145. package/dist/professional-female-a.js.map +0 -1
  146. package/dist/professional-female-b.d.ts +0 -4
  147. package/dist/professional-female-b.d.ts.map +0 -1
  148. package/dist/professional-female-b.js +0 -3
  149. package/dist/professional-female-b.js.map +0 -1
  150. package/dist/professional-male-a.d.ts +0 -4
  151. package/dist/professional-male-a.d.ts.map +0 -1
  152. package/dist/professional-male-a.js +0 -3
  153. package/dist/professional-male-a.js.map +0 -1
  154. package/dist/professional-male-b.d.ts +0 -4
  155. package/dist/professional-male-b.d.ts.map +0 -1
  156. package/dist/professional-male-b.js +0 -3
  157. package/dist/professional-male-b.js.map +0 -1
  158. package/dist/three/tara-rig.d.ts +0 -409
  159. package/dist/three/tara-rig.d.ts.map +0 -1
  160. package/dist/three/tara-rig.js.map +0 -1
  161. package/dist/vikram.d.ts +0 -7
  162. package/dist/vikram.d.ts.map +0 -1
  163. package/dist/vikram.js +0 -20
  164. package/dist/vikram.js.map +0 -1
  165. package/src/canvas/author/parts/eye.mjs +0 -722
  166. package/src/canvas/author/parts/hand.mjs +0 -1156
  167. package/src/canvas/author/parts/mouth.mjs +0 -741
  168. package/src/canvas/author/parts/nose.mjs +0 -100
  169. package/src/canvas/author/parts/skin-detail.mjs +0 -67
  170. package/src/canvas/author/path.mjs +0 -283
  171. package/src/canvas/author/rig.mjs +0 -405
  172. package/src/canvas/avatars/round/face.d.mts +0 -3
  173. package/src/canvas/avatars/round/face.mjs +0 -1307
  174. package/src/canvas/create-rig.d.ts +0 -15
  175. package/src/canvas/create-rig.js +0 -100
  176. package/src/canvas/data/img/professional-female-a-hair-back.webp +0 -0
  177. package/src/canvas/data/img/professional-female-a-hair-front.webp +0 -0
  178. package/src/canvas/data/img/professional-female-a-top-body.webp +0 -0
  179. package/src/canvas/data/img/professional-female-b-hair-back.webp +0 -0
  180. package/src/canvas/data/img/professional-female-b-hair-front.webp +0 -0
  181. package/src/canvas/data/img/professional-female-b-top-body.webp +0 -0
  182. package/src/canvas/data/img/professional-male-a-hair-back.webp +0 -0
  183. package/src/canvas/data/img/professional-male-a-hair-front.webp +0 -0
  184. package/src/canvas/data/img/professional-male-a-top-body.webp +0 -0
  185. package/src/canvas/data/img/professional-male-b-hair-back.webp +0 -0
  186. package/src/canvas/data/img/professional-male-b-hair-front.webp +0 -0
  187. package/src/canvas/data/img/professional-male-b-top-body.webp +0 -0
  188. package/src/canvas/data/img/round-m3-hair-back.webp +0 -0
  189. package/src/canvas/data/img/round-m3-hair-front.webp +0 -0
  190. package/src/canvas/data/img/round-m3-top-body.webp +0 -0
  191. package/src/canvas/data/img/round-w1-hair-back.webp +0 -0
  192. package/src/canvas/data/img/round-w1-hair-front.webp +0 -0
  193. package/src/canvas/data/img/round-w1-top-body.webp +0 -0
  194. package/src/canvas/data/interviewer-female.rig.json +0 -1
  195. package/src/canvas/data/interviewer-male.rig.json +0 -1
  196. package/src/canvas/data/professional-female-a.rig.json +0 -1
  197. package/src/canvas/data/professional-female-b.rig.json +0 -1
  198. package/src/canvas/data/professional-male-a.rig.json +0 -1
  199. package/src/canvas/data/professional-male-b.rig.json +0 -1
  200. package/src/canvas/src/live.js +0 -508
  201. package/src/canvas/src/render2d.js +0 -218
  202. package/src/canvas/src/rig.js +0 -297
  203. package/src/canvas/src/vocab.js +0 -96
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -5,10 +5,9 @@ avatars are lip-synced to the audio and they are state aware: they know when
5
5
  they have been interrupted, when the user is talking versus idle, when a tool
6
6
  call has started and stopped.
7
7
 
8
- No video track, no per-minute avatar vendor, no second media path. Twelve
9
- avatars ship with it — three SVG faces, six professional Canvas2D identities and
10
- three 2.5-D characters — one per entry point, so you pay for the one you import,
11
- and you can author your own.
8
+ No video track, no per-minute avatar vendor, no second media path. SVG faces
9
+ and 2.5-D characters ship with it, one per entry point, so you pay for the one
10
+ you import, and you can author your own.
12
11
 
13
12
  This is the browser half. The pipeline half is
14
13
  [`voqalize-avatar`](https://pypi.org/project/voqalize-avatar/) on PyPI; they are
@@ -16,10 +15,10 @@ two ends of one wire format and release independently, kept compatible by the
16
15
  wire contract rather than a shared version number
17
16
  ([RELEASING.md § Compatibility](https://github.com/voqalize/avatar/blob/main/RELEASING.md#compatibility)).
18
17
 
19
- **Licence: MIT for the code, CC-BY 4.0 for the three 2.5-D character binaries**
20
- (`assets/*.glb`, the artwork — see `assets/README.md` for the credit line). The
21
- code is usable anywhere, including in closed-source products; the characters ask
22
- for attribution and nothing else. The manifest declares the pair as
18
+ **Licence: MIT for the code and the SVG avatars, CC-BY 4.0 for the
19
+ 2.5-D character binaries** (`assets/*.glb` — see `assets/README.md` for the
20
+ credit line). Which applies is decided by the kind of avatar, so adding a
21
+ character never moves the line. The manifest declares the pair as
23
22
  `MIT AND CC-BY-4.0`.
24
23
 
25
24
  ## Install
@@ -65,12 +64,6 @@ That is the integration, both halves of it. Neither takes an argument.
65
64
  embodiment of your `PipecatClient` and reacts to it, so there is no avatar to
66
65
  drive and no state to read back.
67
66
 
68
- **Works the same with or without `@pipecat-ai/voice-ui-kit`.** All `createAvatar`
69
- needs is the `PipecatClient` instance — however you built your call UI, if you
70
- have that instance you can mount an avatar next to it. voice-ui-kit's
71
- components (buttons, visualizers, transport controls) are chrome around the
72
- same client; they neither wrap nor gate it.
73
-
74
67
  ## What you get for free
75
68
 
76
69
  Most of the avatar works on any pipecat application without customization — not
@@ -85,14 +78,14 @@ always the renderer's.
85
78
 
86
79
  What is left over is small, specific, and each item is a case the library
87
80
  refuses to guess at — a deliberate nod or greeting, a tool whose calls never
88
- enter your pipeline, a pose richer than the nine states, a backend that is not
89
- ours. [The architecture
90
- page](https://github.com/voqalize/avatar/blob/main/docs/architecture.md) is the
91
- canonical reference for all of it.
81
+ enter your pipeline, a pose richer than the core states, a backend that is not
82
+ ours. [The wire
83
+ contract](https://github.com/voqalize/avatar/blob/main/docs/contract-wire.md) is
84
+ the canonical reference for all of it.
92
85
 
93
86
  ## The wire protocol
94
87
 
95
- Three commands, one envelope
88
+ `state`, `action` and `cues`, one envelope
96
89
  ([contract-wire.md](https://github.com/voqalize/avatar/blob/main/docs/contract-wire.md)):
97
90
 
98
91
  ```json
@@ -113,16 +106,16 @@ Emission is overwrite, never merge: a `cues` message says "discard everything
113
106
  queued at or after `from_ms`, then append these". The server decides; the client
114
107
  has no say and no way to refuse.
115
108
 
116
- **Not using our backend?** Any server can produce cues, three ways, best first.
109
+ **Not using our backend?** Any server can produce cues; the ways, best first:
117
110
  If your TTS emits native viseme events, map the integer ids through
118
111
  `AZURE_VISEME_TO_LETTER` and ship `{t, v}` as they stream. Otherwise force-align
119
112
  the text against the audio and map ARPAbet through `ARPABET_TO_VISEME`. With no
120
113
  server work at all, `textToCues(text)` is a crude grapheme guesser, fit for
121
- previews only. All three are exported from `@voqalize/avatar/internal`.
114
+ previews only. Each is exported from `@voqalize/avatar/internal`.
122
115
 
123
116
  ## The faces
124
117
 
125
- Three ship today, all hand-authored line art: **`peep`** (the default),
118
+ All hand-authored line art: **`peep`** (the default),
126
119
  **`wren`**, **`myna`**. Each is its own entry point, and you pass the value
127
120
  rather than a name:
128
121
 
@@ -133,70 +126,36 @@ createAvatar({ mount, client, face: myna });
133
126
  ```
134
127
 
135
128
  A name would need a table, and a table is a dynamic index no bundler can shake —
136
- three drawings in every consumer's bundle to render one.
137
-
138
- ## Professional avatars
139
-
140
- Six complete, code-authored avatars ship as their own `createAvatar` modules:
141
-
142
- ```js
143
- import { createAvatar } from '@voqalize/avatar/avatars/arjun';
144
- // or: @voqalize/avatar/avatars/meera
145
- // @voqalize/avatar/avatars/vikram
146
- // @voqalize/avatar/avatars/ishita
147
- // @voqalize/avatar/avatars/kabir
148
- // @voqalize/avatar/avatars/naina
149
-
150
- const avatar = createAvatar({ mount, client: pipecatClient });
151
- ```
152
-
153
- `arjun`/`meera` are the original interviewer pair; `vikram`/`ishita` and
154
- `kabir`/`naina` are two further wardrobe/hair directions on the same rig. The
155
- entry points `interviewer-male`, `interviewer-female`, `professional-male-a`,
156
- `professional-female-a`, `professional-male-b` and `professional-female-b`
157
- still work — they are `@deprecated` aliases for the names above, kept so
158
- existing imports do not break, and should not be used in new code.
159
-
160
- All six depict Indian professionals in their late twenties, without caricature
161
- or regional costume cues. They are calibrated at call-tile size and preserve
162
- all six expression targets, continuous visemes, gaze, blink, head motion, and
163
- the frame-edge gesture hand. Each module is a complete identity, not a face
164
- value: import one instead of the default module and do not pass a `face`
165
- option.
166
-
167
- Their faces use low-contrast, landmark-driven nose planes rather than an
168
- outlined nose glyph. A few identity-specific freckles or a small mole add depth
169
- only in low-motion upper-cheek areas; none are used as demographic cues.
170
-
171
- They use the same public contract and the same Pipecat lifecycle/viseme driver
172
- as the SVG avatars. Their private renderer is Canvas2D; its rig data and bitmap
173
- wardrobe assets are implementation details and no Canvas or pose API is added
174
- to the package surface.
129
+ every drawing in every consumer's bundle to render one.
175
130
 
176
131
  ## The 2.5-D characters
177
132
 
178
- Three characters ship as compiled binaries, each its own `createAvatar` module:
133
+ The characters ship as compiled binaries, each its own `createAvatar` module:
179
134
 
180
135
  ```js
181
136
  import { createAvatar } from '@voqalize/avatar/avatars/tara';
182
137
  // or: @voqalize/avatar/avatars/tushar
183
138
  // @voqalize/avatar/avatars/tanya
139
+ // @voqalize/avatar/avatars/tess
140
+ // @voqalize/avatar/avatars/tanvi
184
141
 
185
142
  const avatar = createAvatar({ mount, client: pipecatClient });
186
143
  ```
187
144
 
188
145
  A photograph of a face projected onto shallow geometry, with the parts that have
189
146
  to move — eyes, teeth, the lip line — built as geometry rather than painted.
190
- Three.js is an *optional* peer (`three`, `>=0.180 <0.187`) behind these three
191
- entry points only, so an SVG or Canvas consumer never downloads it, and the `.glb`
147
+ Three.js is an *optional* peer (`three`, `>=0.180 <0.187`) behind those
148
+ entry points only, so an SVG consumer never downloads it, and the `.glb`
192
149
  is fetched when the avatar mounts.
193
150
 
194
151
  Nothing above the renderer changes: the same wire, the same states, the same
195
152
  cue-synced mouth, and a server that has never heard of these characters drives one
196
- correctly. The head turns 15° of yaw and 24° of pitch, which is a measured limit
197
- rather than an option.
153
+ correctly. How far a character's head may turn is not an option either: it is a
154
+ limit read off that face by eye, carried per character in
155
+ `client/three/motion-limits.json`, which `HEAD_DEG` in
156
+ `client/three/character-rig.ts` turns into a pose channel's degrees.
198
157
 
199
- **The three binaries are artwork under CC-BY 4.0**, separately from the MIT code
158
+ **The binaries are artwork under CC-BY 4.0**, separately from the MIT code
200
159
  around them; the credit line is in `assets/README.md`. Mounting, sizing, the asset
201
160
  budget and what the characters can be asked to do:
202
161
  [characters.md](https://github.com/voqalize/avatar/blob/main/docs/characters.md).
@@ -226,31 +185,3 @@ Omitting it is conforming.
226
185
  **There is deliberately no renderer interface.** The pose channels our SVG mixer
227
186
  uses to talk to our faces are internal, and a second public contract stays
228
187
  premature until a second renderer says what it needs.
229
-
230
- ## What is in this tarball
231
-
232
- `dist/` is the compiled client — `AvatarClient`, the avatar entry points and the
233
- React binding. `src/` is the widget itself: the mixer, the SVG rig and drawings,
234
- plus the private Canvas2D interviewer rigs and their assets, as dependency-free
235
- ES modules with no build step, imported by `dist/` through ordinary relative
236
- paths. `client/` is the TypeScript those `dist/` files were compiled from, so
237
- the source maps resolve. `assets/` is the three compiled characters and their
238
- licence note — the only non-JavaScript thing here, fetched at runtime by URL.
239
-
240
- The contract documents do not ship here. They live in the repository, which is
241
- where they are kept current:
242
- [github.com/voqalize/avatar](https://github.com/voqalize/avatar).
243
-
244
- ## License
245
-
246
- **MIT for the code, CC-BY 4.0 for the artwork**, and Voqalize holds the
247
- copyright on all of it. The manifest declares the pair as `MIT AND CC-BY-4.0`;
248
- the artwork is `assets/*.glb`, the three 2.5-D characters, and `assets/README.md`
249
- carries the credit line. Everything else in the tarball is MIT, usable anywhere
250
- including in closed-source products.
251
-
252
- The drawing idiom `peep` is authored in is
253
- [Open Peeps](https://www.openpeeps.com/) (CC0) — no artwork is copied. The
254
- `avatarsync` aligner that produces the mouth shapes is a fork of
255
- [Rhubarb Lip Sync](https://github.com/DanielSWolf/rhubarb-lip-sync) (MIT) and
256
- ships in the Python package, not this one.
package/assets/README.md CHANGED
@@ -1,26 +1,13 @@
1
1
  # The character binaries
2
2
 
3
- Three 2.5-D characters, one compiled file each:
3
+ The 2.5-D characters, one compiled file each: `tara.glb`, `tushar.glb`,
4
+ `tanya.glb`, `tess.glb`, `tanvi.glb`.
4
5
 
5
- | file | character | what it is |
6
- |---|---|---|
7
- | `tara.glb` | tara | the first; shallow geometry under a projected portrait |
8
- | `tushar.glb` | tushar | the second, her scripts with his landmarks |
9
- | `tanya.glb` | tanya | the third, built from supplied reference images |
10
-
11
- They are loaded for you. `@voqalize/avatar/avatars/tara` resolves the file beside
12
- itself and hands it to a loader; you never name a path, and the only reason to
13
- know these are here is the licence below. `three` is an *optional* peer of this
14
- package, so importing a drawing instead of a character downloads none of this.
15
-
16
- Each file carries geometry, one morph target per pose channel, and its texture
17
- atlases as WebP — which is most of the bytes, because the atlases are
18
- photographs. **They are build outputs. Do not hand-edit one**; there is nothing
19
- in this directory to regenerate it from, and the next release overwrites it.
6
+ **They are build outputs. Do not hand-edit one.**
20
7
 
21
8
  ## Licence: CC-BY 4.0
22
9
 
23
- The rest of this package is MIT. These three files are artwork, not code, so they
10
+ The rest of this package is MIT. These files are artwork, not code, so they
24
11
  carry an artwork licence: **Creative Commons Attribution 4.0 International**, the
25
12
  full text in `LICENSE-CC-BY-4.0` at the package root. Use them in a product,
26
13
  commercially, modified or retextured, and credit us:
@@ -36,12 +23,37 @@ The licence is also written inside each file, in the glTF copyright field. A
36
23
  binary gets copied out of a dependency tree and passed around; a string in the
37
24
  file is the only way terms travel with it.
38
25
 
26
+ ## What in these files is not ours
27
+
28
+ The difference is the mesh. Every character here carries one *canonical*
29
+ topology that other people published, fitted to that character's face — the
30
+ geometry is no longer authored per face, which is what makes a landmark table
31
+ the only thing that distinguishes one file from the next. **The obligations
32
+ below travel with every file, so they are named here and again in each one's
33
+ glTF copyright field.** Neither one restricts what the rest of this package is
34
+ licensed for.
35
+
36
+ - **The face shell is MediaPipe's canonical face mesh** — Copyright The
37
+ MediaPipe Authors, **Apache License 2.0**, the full text in
38
+ `LICENSE-APACHE-2.0` at the package root. **Modified**: the triangles closing
39
+ the eyes and the lips are removed so a blink and a viseme have an opening to
40
+ be; every edge is subdivided once; rings are appended outside its face oval to
41
+ reach the hair and the neck; and every vertex is moved onto landmarks measured
42
+ from a photograph, which is what makes it a face rather than the reference
43
+ head. What survives unmodified is the topology — which vertex is which point,
44
+ and what joins them.
45
+ - **The dental arch is fitted from ICT-FaceKit** — Copyright (c) 2020 USC
46
+ Institute for Creative Technologies, **MIT**, the same terms as this package's
47
+ own `LICENSE`. What was taken is a measurement rather than geometry: the
48
+ curvature of its upper arch, read off its generic head and carried here as the
49
+ coefficients of a polynomial. None of its mesh is in this file.
50
+
39
51
  ## The faces are synthetic
40
52
 
41
53
  Every character began as an image from a generative model — OpenAI's and
42
54
  Google's — and **none of them depicts a real person**. Any resemblance to one is
43
55
  coincidence, not a likeness, and there are no personality rights attached to any
44
- of these three. What we did with that image is ours: the geometry, the measured
56
+ of them. What we did with that image is ours: the geometry, the measured
45
57
  landmarks, the projection, the relighting and the authored morph targets are all
46
58
  human work, and they are the substance of what is licensed here.
47
59
 
Binary file
package/assets/tanya.glb CHANGED
Binary file
package/assets/tara.glb CHANGED
Binary file
Binary file
package/assets/tushar.glb CHANGED
Binary file
@@ -47,7 +47,29 @@ export {
47
47
  LEAD_MS,
48
48
  // The body's share of a held tilt, for a page driving a rig by hand.
49
49
  SHOULDER_TILT,
50
+ // Stepping a gesture by hand: the catalogue, the player, and the smoothing
51
+ // law the mixer puts between a clip's keyframes and the face. A filmstrip
52
+ // instrument needs all three, and the one thing it must not do is fork the
53
+ // smoothing — that is the part a keyframe is authored against
54
+ // (docs/internal-mixer.md § Smoothing).
55
+ INTERNAL_CLIPS,
56
+ ClipPlayer,
57
+ TAU,
58
+ clamp,
59
+ approach,
60
+ // Posing a face directly, with no mixer, no clock and no client above it —
61
+ // what a pose sheet or a rig-conformance page does. `makeParams` fills the
62
+ // rests around a handful of overrides, `emotionPose` names a familiar set of
63
+ // them, `avatarFrame` wraps the result and `createSvgRig(face)` draws it.
64
+ makeParams,
65
+ emotionPose,
66
+ avatarFrame,
67
+ createSvgRig,
50
68
  shapeFor,
69
+ // The one number that says how far the mandible falls for a given aperture.
70
+ // Anything composing a mouth pose without `shapeFor` — a retarget, a driver —
71
+ // needs it, and the amplitudes behind the lips are calibrated at it.
72
+ JAW_OF_OPEN,
51
73
  normalizeCues,
52
74
  textToCues,
53
75
  ARPABET_TO_VISEME,
@@ -55,6 +77,8 @@ export {
55
77
  } from "../src/avatar.js";
56
78
 
57
79
  export type {
80
+ Clip,
81
+ ClipSample,
58
82
  AvatarApi,
59
83
  AvatarStateName,
60
84
  AvatarActionId,
@@ -1,13 +1,12 @@
1
1
  /**
2
- * `supports` for every avatar this package ships — the SVG faces and the six
3
- * canvas identities alike.
2
+ * `supports` for every avatar this package ships.
4
3
  *
5
- * It is one constant and one file because they are one renderer: the canvas
6
- * avatars mount the same mixer with the same clip library, so a second list
7
- * would be the same list with a second chance to be wrong. It is not in
4
+ * It is one constant and one file because they are one renderer: every avatar
5
+ * mounts the same mixer with the same clip library, so a second list would be
6
+ * the same list with a second chance to be wrong. It is not in
8
7
  * `createAvatar.ts`, where the type is documented, because a value is imported
9
- * for real — reading it from there would pull `peep`'s drawing into a canvas
10
- * avatar's bundle.
8
+ * for real — reading it from there would pull `peep`'s drawing into every
9
+ * consumer's bundle.
11
10
  *
12
11
  * The two required ids first, then this renderer's own catalogue. `ACTION_IDS`
13
12
  * already carries `RESPONSE_INTERRUPTED` as this renderer's shape for it, so
@@ -1,14 +1,16 @@
1
1
  /**
2
- * The three compiled characters as one table — for a page that enumerates them.
2
+ * Every compiled character as one table — for a page that enumerates them.
3
3
  *
4
4
  * Each URL lives in its own module (`tara-asset.ts` and its siblings) and this
5
5
  * file only gathers them, because a bundler emits assets per module: anything
6
- * importing *this* ships all three GLBs, which is right for a rig instrument
7
- * that switches between characters and wrong for a consumer who mounted one.
6
+ * importing *this* ships every GLB, which is right for a rig instrument that
7
+ * switches between characters and wrong for a consumer who mounted one.
8
8
  * So the character modules never import this — they import their own — and the
9
9
  * only reader is `/internal/three`, a separate entry point that ships nothing.
10
10
  */
11
11
  import { TANYA_GLB } from "./tanya-asset.js";
12
+ import { TANVI_GLB } from "./tanvi-asset.js";
13
+ import { TESS_GLB } from "./tess-asset.js";
12
14
  import { TARA_GLB } from "./tara-asset.js";
13
15
  import { TUSHAR_GLB } from "./tushar-asset.js";
14
16
 
@@ -16,6 +18,8 @@ export const ASSETS = Object.freeze({
16
18
  tara: TARA_GLB,
17
19
  tushar: TUSHAR_GLB,
18
20
  tanya: TANYA_GLB,
21
+ tess: TESS_GLB,
22
+ tanvi: TANVI_GLB,
19
23
  });
20
24
 
21
25
  /** Every compiled character, in build order. */
@@ -23,5 +23,5 @@ export const HARD_BUDGET = Object.freeze({
23
23
  triangles: 60_000,
24
24
  drawCalls: 30,
25
25
  bones: 40,
26
- morphTargets: 40,
26
+ morphTargets: 45,
27
27
  });