talking-head-studio 0.2.3 → 0.2.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/dist/html.js CHANGED
@@ -241,7 +241,7 @@ async function init() {
241
241
  log('Initializing HeadAudio...');
242
242
  try {
243
243
  const haModule = await import(HEAD_AUDIO_URL);
244
- if (haModule.HeadAudio && head.audioCtx) {
244
+ if (haModule.HeadAudio && head.audioCtx && head.audioCtx.audioWorklet) {
245
245
  await head.audioCtx.audioWorklet.addModule(HEAD_AUDIO_WORKLET);
246
246
  headaudio = new haModule.HeadAudio(head.audioCtx);
247
247
  await headaudio.loadModel(HEAD_AUDIO_MODEL);
@@ -535,7 +535,7 @@ function onIncomingMessage(event) {
535
535
  }
536
536
  }
537
537
  }
538
- const val = Math.min(1, msg.value * 2.5);
538
+ const val = Math.min(1, msg.value * 1.8);
539
539
  amplitudeDecay = Math.max(amplitudeDecay * 0.7, val);
540
540
  for (let i = 0; i < jawMorphCache.length; i++) {
541
541
  jawMorphCache[i].influences[jawMorphCache[i].idx] = amplitudeDecay;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "talking-head-studio",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Cross-platform 3D avatar component for React Native & web — lip-sync, gestures, accessories, and LLM integration. Powered by TalkingHead + Three.js.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/html.ts CHANGED
@@ -253,7 +253,7 @@ async function init() {
253
253
  log('Initializing HeadAudio...');
254
254
  try {
255
255
  const haModule = await import(HEAD_AUDIO_URL);
256
- if (haModule.HeadAudio && head.audioCtx) {
256
+ if (haModule.HeadAudio && head.audioCtx && head.audioCtx.audioWorklet) {
257
257
  await head.audioCtx.audioWorklet.addModule(HEAD_AUDIO_WORKLET);
258
258
  headaudio = new haModule.HeadAudio(head.audioCtx);
259
259
  await headaudio.loadModel(HEAD_AUDIO_MODEL);
@@ -547,7 +547,7 @@ function onIncomingMessage(event) {
547
547
  }
548
548
  }
549
549
  }
550
- const val = Math.min(1, msg.value * 2.5);
550
+ const val = Math.min(1, msg.value * 1.8);
551
551
  amplitudeDecay = Math.max(amplitudeDecay * 0.7, val);
552
552
  for (let i = 0; i < jawMorphCache.length; i++) {
553
553
  jawMorphCache[i].influences[jawMorphCache[i].idx] = amplitudeDecay;