@omote/core 0.5.4 → 0.5.5
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/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -584,6 +584,14 @@ interface FullFacePipelineOptions {
|
|
|
584
584
|
chunkSize?: number;
|
|
585
585
|
/** A2E inference engine */
|
|
586
586
|
lam: A2EBackend;
|
|
587
|
+
/**
|
|
588
|
+
* Identity/style index for the A2E model (default: 0).
|
|
589
|
+
*
|
|
590
|
+
* The LAM model uses a 12-class one-hot identity vector as style conditioning.
|
|
591
|
+
* Different indices produce different expression intensity across face regions.
|
|
592
|
+
* Only affects Wav2Vec2Inference (GPU). Wav2ArkitCpuInference has identity 11 baked in.
|
|
593
|
+
*/
|
|
594
|
+
identityIndex?: number;
|
|
587
595
|
/** Per-character expression weight scaling */
|
|
588
596
|
profile?: ExpressionProfile;
|
|
589
597
|
/**
|
|
@@ -2259,6 +2267,17 @@ interface A2EProcessorConfig {
|
|
|
2259
2267
|
sampleRate?: number;
|
|
2260
2268
|
/** Samples per inference chunk (default: 16000 = 1s) */
|
|
2261
2269
|
chunkSize?: number;
|
|
2270
|
+
/**
|
|
2271
|
+
* Identity/style index for the A2E model (default: 0).
|
|
2272
|
+
*
|
|
2273
|
+
* The LAM model uses a one-hot identity vector (12 classes, indices 0-11) as
|
|
2274
|
+
* style conditioning alongside audio features. Different indices produce
|
|
2275
|
+
* different expression intensity across face regions (brows, eyes, cheeks).
|
|
2276
|
+
*
|
|
2277
|
+
* Only affects Wav2Vec2Inference (GPU model). Wav2ArkitCpuInference has
|
|
2278
|
+
* identity 11 baked into the model weights.
|
|
2279
|
+
*/
|
|
2280
|
+
identityIndex?: number;
|
|
2262
2281
|
/** Callback fired with each blendshape frame (push mode) */
|
|
2263
2282
|
onFrame?: (frame: Float32Array) => void;
|
|
2264
2283
|
/** Error callback */
|
|
@@ -2268,6 +2287,7 @@ declare class A2EProcessor {
|
|
|
2268
2287
|
private readonly backend;
|
|
2269
2288
|
private readonly sampleRate;
|
|
2270
2289
|
private readonly chunkSize;
|
|
2290
|
+
private readonly identityIndex;
|
|
2271
2291
|
private readonly onFrame?;
|
|
2272
2292
|
private readonly onError?;
|
|
2273
2293
|
private bufferCapacity;
|
package/dist/index.d.ts
CHANGED
|
@@ -584,6 +584,14 @@ interface FullFacePipelineOptions {
|
|
|
584
584
|
chunkSize?: number;
|
|
585
585
|
/** A2E inference engine */
|
|
586
586
|
lam: A2EBackend;
|
|
587
|
+
/**
|
|
588
|
+
* Identity/style index for the A2E model (default: 0).
|
|
589
|
+
*
|
|
590
|
+
* The LAM model uses a 12-class one-hot identity vector as style conditioning.
|
|
591
|
+
* Different indices produce different expression intensity across face regions.
|
|
592
|
+
* Only affects Wav2Vec2Inference (GPU). Wav2ArkitCpuInference has identity 11 baked in.
|
|
593
|
+
*/
|
|
594
|
+
identityIndex?: number;
|
|
587
595
|
/** Per-character expression weight scaling */
|
|
588
596
|
profile?: ExpressionProfile;
|
|
589
597
|
/**
|
|
@@ -2259,6 +2267,17 @@ interface A2EProcessorConfig {
|
|
|
2259
2267
|
sampleRate?: number;
|
|
2260
2268
|
/** Samples per inference chunk (default: 16000 = 1s) */
|
|
2261
2269
|
chunkSize?: number;
|
|
2270
|
+
/**
|
|
2271
|
+
* Identity/style index for the A2E model (default: 0).
|
|
2272
|
+
*
|
|
2273
|
+
* The LAM model uses a one-hot identity vector (12 classes, indices 0-11) as
|
|
2274
|
+
* style conditioning alongside audio features. Different indices produce
|
|
2275
|
+
* different expression intensity across face regions (brows, eyes, cheeks).
|
|
2276
|
+
*
|
|
2277
|
+
* Only affects Wav2Vec2Inference (GPU model). Wav2ArkitCpuInference has
|
|
2278
|
+
* identity 11 baked into the model weights.
|
|
2279
|
+
*/
|
|
2280
|
+
identityIndex?: number;
|
|
2262
2281
|
/** Callback fired with each blendshape frame (push mode) */
|
|
2263
2282
|
onFrame?: (frame: Float32Array) => void;
|
|
2264
2283
|
/** Error callback */
|
|
@@ -2268,6 +2287,7 @@ declare class A2EProcessor {
|
|
|
2268
2287
|
private readonly backend;
|
|
2269
2288
|
private readonly sampleRate;
|
|
2270
2289
|
private readonly chunkSize;
|
|
2290
|
+
private readonly identityIndex;
|
|
2271
2291
|
private readonly onFrame?;
|
|
2272
2292
|
private readonly onError?;
|
|
2273
2293
|
private bufferCapacity;
|
package/dist/index.js
CHANGED
|
@@ -916,6 +916,7 @@ var A2EProcessor = class {
|
|
|
916
916
|
this.backend = config.backend;
|
|
917
917
|
this.sampleRate = config.sampleRate ?? 16e3;
|
|
918
918
|
this.chunkSize = config.chunkSize ?? config.backend.chunkSize ?? 16e3;
|
|
919
|
+
this.identityIndex = config.identityIndex ?? 0;
|
|
919
920
|
this.onFrame = config.onFrame;
|
|
920
921
|
this.onError = config.onError;
|
|
921
922
|
this.bufferCapacity = this.chunkSize * 2;
|
|
@@ -1123,7 +1124,7 @@ var A2EProcessor = class {
|
|
|
1123
1124
|
const { chunk, timestamp } = this.pendingChunks.shift();
|
|
1124
1125
|
try {
|
|
1125
1126
|
const t0 = performance.now();
|
|
1126
|
-
const result = await this.backend.infer(chunk);
|
|
1127
|
+
const result = await this.backend.infer(chunk, this.identityIndex);
|
|
1127
1128
|
const inferMs = Math.round(performance.now() - t0);
|
|
1128
1129
|
const actualDuration = chunk.length / this.sampleRate;
|
|
1129
1130
|
const actualFrameCount = Math.ceil(actualDuration * FRAME_RATE);
|
|
@@ -3247,6 +3248,7 @@ var FullFacePipeline = class extends EventEmitter {
|
|
|
3247
3248
|
backend: options.lam,
|
|
3248
3249
|
sampleRate,
|
|
3249
3250
|
chunkSize,
|
|
3251
|
+
identityIndex: options.identityIndex,
|
|
3250
3252
|
onError: (error) => {
|
|
3251
3253
|
logger4.error("A2E inference error", { message: error.message, stack: error.stack });
|
|
3252
3254
|
this.emit("error", error);
|