@omote/core 0.10.5 → 0.10.6
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/README.md +76 -34
- package/dist/chunk-3FILA2CD.mjs +785 -0
- package/dist/chunk-3FILA2CD.mjs.map +1 -0
- package/dist/chunk-5WIOGMJA.mjs +785 -0
- package/dist/chunk-5WIOGMJA.mjs.map +1 -0
- package/dist/chunk-NWZMIQK4.mjs +782 -0
- package/dist/chunk-NWZMIQK4.mjs.map +1 -0
- package/dist/chunk-WW4XAUJ3.mjs +208 -0
- package/dist/chunk-WW4XAUJ3.mjs.map +1 -0
- package/dist/index.d.mts +84 -79
- package/dist/index.d.ts +84 -79
- package/dist/index.js +514 -406
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -199
- package/dist/index.mjs.map +1 -1
- package/dist/logging/index.js +5 -0
- package/dist/logging/index.js.map +1 -1
- package/dist/logging/index.mjs +1 -1
- package/dist/otlp-2BML6FIK.mjs +7 -0
- package/dist/otlp-2BML6FIK.mjs.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3139,6 +3139,83 @@ declare function preloadModels(urls: string[], onProgress?: (current: number, to
|
|
|
3139
3139
|
*/
|
|
3140
3140
|
declare function formatBytes(bytes: number): string;
|
|
3141
3141
|
|
|
3142
|
+
/**
|
|
3143
|
+
* Console Exporter
|
|
3144
|
+
*
|
|
3145
|
+
* Exports telemetry data to the browser console for development/debugging.
|
|
3146
|
+
*
|
|
3147
|
+
* @category Telemetry
|
|
3148
|
+
*/
|
|
3149
|
+
|
|
3150
|
+
/**
|
|
3151
|
+
* Span data structure for export
|
|
3152
|
+
*/
|
|
3153
|
+
interface SpanData {
|
|
3154
|
+
name: string;
|
|
3155
|
+
traceId: string;
|
|
3156
|
+
spanId: string;
|
|
3157
|
+
parentSpanId?: string;
|
|
3158
|
+
startTime: number;
|
|
3159
|
+
endTime: number;
|
|
3160
|
+
durationMs: number;
|
|
3161
|
+
/** Epoch timestamp in ms for OTLP export (start) */
|
|
3162
|
+
epochMs: number;
|
|
3163
|
+
/** Epoch timestamp in ms for OTLP export (end) */
|
|
3164
|
+
endEpochMs: number;
|
|
3165
|
+
status: 'ok' | 'error';
|
|
3166
|
+
attributes: SpanAttributes;
|
|
3167
|
+
error?: Error;
|
|
3168
|
+
}
|
|
3169
|
+
/**
|
|
3170
|
+
* Metric data structure for export
|
|
3171
|
+
*/
|
|
3172
|
+
interface MetricData {
|
|
3173
|
+
name: string;
|
|
3174
|
+
type: 'counter' | 'histogram';
|
|
3175
|
+
value: number;
|
|
3176
|
+
attributes: Record<string, string | number | boolean>;
|
|
3177
|
+
timestamp: number;
|
|
3178
|
+
/** Histogram bucket data for OTLP export */
|
|
3179
|
+
histogramData?: {
|
|
3180
|
+
count: number;
|
|
3181
|
+
sum: number;
|
|
3182
|
+
min: number;
|
|
3183
|
+
max: number;
|
|
3184
|
+
bucketBoundaries: number[];
|
|
3185
|
+
bucketCounts: number[];
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
/**
|
|
3189
|
+
* Exporter interface that all exporters must implement
|
|
3190
|
+
*/
|
|
3191
|
+
interface TelemetryExporterInterface {
|
|
3192
|
+
/** Export a completed span */
|
|
3193
|
+
exportSpan(span: SpanData): void;
|
|
3194
|
+
/** Export a metric */
|
|
3195
|
+
exportMetric(metric: MetricData): void;
|
|
3196
|
+
/** Flush any buffered data */
|
|
3197
|
+
flush(): Promise<void>;
|
|
3198
|
+
/** Shutdown the exporter */
|
|
3199
|
+
shutdown(): Promise<void>;
|
|
3200
|
+
}
|
|
3201
|
+
/**
|
|
3202
|
+
* Console exporter for development/debugging
|
|
3203
|
+
*
|
|
3204
|
+
* Outputs spans and metrics to the browser console with formatting.
|
|
3205
|
+
*/
|
|
3206
|
+
declare class ConsoleExporter implements TelemetryExporterInterface {
|
|
3207
|
+
private enabled;
|
|
3208
|
+
private prefix;
|
|
3209
|
+
constructor(options?: {
|
|
3210
|
+
enabled?: boolean;
|
|
3211
|
+
prefix?: string;
|
|
3212
|
+
});
|
|
3213
|
+
exportSpan(span: SpanData): void;
|
|
3214
|
+
exportMetric(metric: MetricData): void;
|
|
3215
|
+
flush(): Promise<void>;
|
|
3216
|
+
shutdown(): Promise<void>;
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3142
3219
|
/**
|
|
3143
3220
|
* Telemetry Types
|
|
3144
3221
|
*
|
|
@@ -3190,6 +3267,8 @@ interface TelemetryConfig {
|
|
|
3190
3267
|
metricsEnabled?: boolean;
|
|
3191
3268
|
/** Metrics export interval in ms. Default: 60000 */
|
|
3192
3269
|
metricsIntervalMs?: number;
|
|
3270
|
+
/** Custom exporter instance (overrides `exporter` when provided) */
|
|
3271
|
+
customExporter?: TelemetryExporterInterface;
|
|
3193
3272
|
}
|
|
3194
3273
|
/**
|
|
3195
3274
|
* Span attributes for model operations
|
|
@@ -3290,20 +3369,9 @@ declare const MetricNames: {
|
|
|
3290
3369
|
readonly COMPOSITOR_COMPOSE_LATENCY: "omote.compositor.compose.latency_us";
|
|
3291
3370
|
/** Counter: Frames exceeding budget threshold */
|
|
3292
3371
|
readonly AVATAR_FRAME_DROPS: "omote.avatar.frame.drops";
|
|
3372
|
+
/** Counter: Audio scheduling gaps (playback fell behind) */
|
|
3373
|
+
readonly AUDIO_SCHEDULE_GAP: "omote.audio.schedule_gap";
|
|
3293
3374
|
};
|
|
3294
|
-
/**
|
|
3295
|
-
* Centralized error type taxonomy for structured error reporting.
|
|
3296
|
-
*/
|
|
3297
|
-
declare const ErrorTypes: {
|
|
3298
|
-
readonly INFERENCE: "inference_error";
|
|
3299
|
-
readonly NETWORK: "network_error";
|
|
3300
|
-
readonly TIMEOUT: "timeout";
|
|
3301
|
-
readonly USER: "user_error";
|
|
3302
|
-
readonly RUNTIME: "runtime_error";
|
|
3303
|
-
readonly MEDIA: "media_error";
|
|
3304
|
-
readonly MODEL: "model_error";
|
|
3305
|
-
};
|
|
3306
|
-
type ErrorType = typeof ErrorTypes[keyof typeof ErrorTypes];
|
|
3307
3375
|
/**
|
|
3308
3376
|
* Histogram buckets for inference latency (ms)
|
|
3309
3377
|
*/
|
|
@@ -3379,6 +3447,7 @@ declare function getTelemetry(): OmoteTelemetry | null;
|
|
|
3379
3447
|
declare class OmoteTelemetry {
|
|
3380
3448
|
private config;
|
|
3381
3449
|
private exporter;
|
|
3450
|
+
private exporterReady;
|
|
3382
3451
|
private activeTraceId;
|
|
3383
3452
|
private metricsIntervalId;
|
|
3384
3453
|
private spanStack;
|
|
@@ -3454,7 +3523,7 @@ declare class OmoteTelemetry {
|
|
|
3454
3523
|
* });
|
|
3455
3524
|
* ```
|
|
3456
3525
|
*/
|
|
3457
|
-
recordHistogram(name: string, value: number, attributes?: Record<string, string | number | boolean
|
|
3526
|
+
recordHistogram(name: string, value: number, attributes?: Record<string, string | number | boolean>, bucketBoundaries?: number[]): void;
|
|
3458
3527
|
/**
|
|
3459
3528
|
* Generate unique key for metric with attributes
|
|
3460
3529
|
*/
|
|
@@ -3489,70 +3558,6 @@ declare class OmoteTelemetry {
|
|
|
3489
3558
|
} | null;
|
|
3490
3559
|
}
|
|
3491
3560
|
|
|
3492
|
-
/**
|
|
3493
|
-
* Console Exporter
|
|
3494
|
-
*
|
|
3495
|
-
* Exports telemetry data to the browser console for development/debugging.
|
|
3496
|
-
*
|
|
3497
|
-
* @category Telemetry
|
|
3498
|
-
*/
|
|
3499
|
-
|
|
3500
|
-
/**
|
|
3501
|
-
* Span data structure for export
|
|
3502
|
-
*/
|
|
3503
|
-
interface SpanData {
|
|
3504
|
-
name: string;
|
|
3505
|
-
traceId: string;
|
|
3506
|
-
spanId: string;
|
|
3507
|
-
parentSpanId?: string;
|
|
3508
|
-
startTime: number;
|
|
3509
|
-
endTime: number;
|
|
3510
|
-
durationMs: number;
|
|
3511
|
-
status: 'ok' | 'error';
|
|
3512
|
-
attributes: SpanAttributes;
|
|
3513
|
-
error?: Error;
|
|
3514
|
-
}
|
|
3515
|
-
/**
|
|
3516
|
-
* Metric data structure for export
|
|
3517
|
-
*/
|
|
3518
|
-
interface MetricData {
|
|
3519
|
-
name: string;
|
|
3520
|
-
type: 'counter' | 'histogram';
|
|
3521
|
-
value: number;
|
|
3522
|
-
attributes: Record<string, string | number | boolean>;
|
|
3523
|
-
timestamp: number;
|
|
3524
|
-
}
|
|
3525
|
-
/**
|
|
3526
|
-
* Exporter interface that all exporters must implement
|
|
3527
|
-
*/
|
|
3528
|
-
interface TelemetryExporterInterface {
|
|
3529
|
-
/** Export a completed span */
|
|
3530
|
-
exportSpan(span: SpanData): void;
|
|
3531
|
-
/** Export a metric */
|
|
3532
|
-
exportMetric(metric: MetricData): void;
|
|
3533
|
-
/** Flush any buffered data */
|
|
3534
|
-
flush(): Promise<void>;
|
|
3535
|
-
/** Shutdown the exporter */
|
|
3536
|
-
shutdown(): Promise<void>;
|
|
3537
|
-
}
|
|
3538
|
-
/**
|
|
3539
|
-
* Console exporter for development/debugging
|
|
3540
|
-
*
|
|
3541
|
-
* Outputs spans and metrics to the browser console with formatting.
|
|
3542
|
-
*/
|
|
3543
|
-
declare class ConsoleExporter implements TelemetryExporterInterface {
|
|
3544
|
-
private enabled;
|
|
3545
|
-
private prefix;
|
|
3546
|
-
constructor(options?: {
|
|
3547
|
-
enabled?: boolean;
|
|
3548
|
-
prefix?: string;
|
|
3549
|
-
});
|
|
3550
|
-
exportSpan(span: SpanData): void;
|
|
3551
|
-
exportMetric(metric: MetricData): void;
|
|
3552
|
-
flush(): Promise<void>;
|
|
3553
|
-
shutdown(): Promise<void>;
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
3561
|
/**
|
|
3557
3562
|
* OTLP Exporter
|
|
3558
3563
|
*
|
|
@@ -4831,4 +4836,4 @@ declare class VoiceOrchestrator extends EventEmitter<VoiceOrchestratorEvents> {
|
|
|
4831
4836
|
private setState;
|
|
4832
4837
|
}
|
|
4833
4838
|
|
|
4834
|
-
export { type A2EBackend, type A2EModelInfo, A2EProcessor, type A2EProcessorConfig, type A2EResult, A2EUnifiedAdapter, ALL_AUS, ARKIT_BLENDSHAPES, type AUActivation, AU_TO_ARKIT, type ActiveSpan, type AnimationClip, type AnimationController, AnimationGraph, type AnimationGraphConfig, type AnimationGraphEvents, type AnimationLayer, type AnimationOutput, type AnimationSource, type AnimationSourceOptions, type AnimationState, type AnimationStateName, type AnimationTrigger, AudioChunkCoalescer, type AudioChunkCoalescerOptions, AudioEnergyAnalyzer, AudioScheduler, type AudioSchedulerOptions, BLENDSHAPE_TO_GROUP, type BackendPreference, type BlendWeight, type BlendshapeGroup, BlendshapeSmoother, type BlendshapeSmootherConfig, type BoneFilterConfig, type CacheConfig, type CacheSpanAttributes, CharacterController, type CharacterControllerConfig, type CharacterProfile, type CharacterUpdateInput, type CharacterUpdateOutput, ConsoleExporter, type ConversationalState, type CreateA2EConfig, type CreateKokoroTTSConfig, type CreateSenseVoiceConfig, type CreateTTSPlayerConfig, DEFAULT_ANIMATION_CONFIG, DEFAULT_BONE_FILTER, DEFAULT_MODEL_URLS, EMOTION_NAMES, EMOTION_TO_AU, EMOTION_VECTOR_SIZE, EXPLICIT_EMOTION_COUNT, type ElevenLabsConfig, ElevenLabsTTSBackend, type EmotionAnimationMap, EmotionController, type EmotionLabel, type EmotionName, type EmotionPresetName, EmotionPresets, EmotionResolver, type EmotionWeights, EmphasisDetector,
|
|
4839
|
+
export { type A2EBackend, type A2EModelInfo, A2EProcessor, type A2EProcessorConfig, type A2EResult, A2EUnifiedAdapter, ALL_AUS, ARKIT_BLENDSHAPES, type AUActivation, AU_TO_ARKIT, type ActiveSpan, type AnimationClip, type AnimationController, AnimationGraph, type AnimationGraphConfig, type AnimationGraphEvents, type AnimationLayer, type AnimationOutput, type AnimationSource, type AnimationSourceOptions, type AnimationState, type AnimationStateName, type AnimationTrigger, AudioChunkCoalescer, type AudioChunkCoalescerOptions, AudioEnergyAnalyzer, AudioScheduler, type AudioSchedulerOptions, BLENDSHAPE_TO_GROUP, type BackendPreference, type BlendWeight, type BlendshapeGroup, BlendshapeSmoother, type BlendshapeSmootherConfig, type BoneFilterConfig, type CacheConfig, type CacheSpanAttributes, CharacterController, type CharacterControllerConfig, type CharacterProfile, type CharacterUpdateInput, type CharacterUpdateOutput, ConsoleExporter, type ConversationalState, type CreateA2EConfig, type CreateKokoroTTSConfig, type CreateSenseVoiceConfig, type CreateTTSPlayerConfig, DEFAULT_ANIMATION_CONFIG, DEFAULT_BONE_FILTER, DEFAULT_MODEL_URLS, EMOTION_NAMES, EMOTION_TO_AU, EMOTION_VECTOR_SIZE, EXPLICIT_EMOTION_COUNT, type ElevenLabsConfig, ElevenLabsTTSBackend, type EmotionAnimationMap, EmotionController, type EmotionLabel, type EmotionName, type EmotionPresetName, EmotionPresets, EmotionResolver, type EmotionWeights, EmphasisDetector, EventEmitter, type ExpressionProfile, FaceCompositor, type FaceCompositorConfig, type FaceCompositorInput, type FaceCompositorOutput, type FetchWithCacheOptions, type FrameSource, type FullFaceFrame, HF_CDN_URLS, INFERENCE_LATENCY_BUCKETS, type InferenceFactoryConfig, type InferenceSpanAttributes, type InterruptionConfig, type InterruptionEvents, InterruptionHandler, KOKORO_VOICES, type KokoroStreamChunk, type KokoroTTSConfig, type KokoroTTSModelInfo, type KokoroTTSResult, KokoroTTSUnifiedAdapter, type KokoroVoiceName, LAM_BLENDSHAPES, type LifeLayerConfig, type LifeLayerInput, type LifeLayerOutput, type LoadingProgress, MIXAMO_PREFIX, MODEL_LOAD_TIME_BUCKETS, type MetricData, MetricNames, MicLipSync, type MicLipSyncConfig, type MicLipSyncEvents, type MicLipSyncFrame, type MicLipSyncState, MicrophoneCapture, type MicrophoneCaptureConfig, ModelCache, type ModelSpanAttributes, type ModelUrlKey, OTLPExporter, type OTLPExporterConfig, OmoteEvents, OmoteTelemetry, PRESERVE_POSITION_BONES, PlaybackPipeline, type PlaybackPipelineConfig, type PlaybackPipelineEvents, type PlaybackState, ProceduralLifeLayer, type Quat, type QuotaInfo, type ResolvedEmotion, type ResponseHandler, RingBuffer, type RuntimeBackend, type SafariSpeechConfig, SafariSpeechRecognition, type SamplingConfig, type SenseVoiceBackend, type SenseVoiceConfig, type SenseVoiceLanguage, type SenseVoiceModelInfo, type SenseVoiceResult, SenseVoiceUnifiedAdapter, type SenseVoiceWorkerConfig, type SileroVADBackend, type SileroVADConfig, type SileroVADFactoryConfig, SileroVADUnifiedAdapter, type SpanAttributes, type SpanData, type SpeechErrorCallback, SpeechListener, type SpeechListenerConfig, type SpeechListenerEvents, type SpeechListenerState, type SpeechRecognitionResult, type SpeechResultCallback, type SpeechSegment, type SynthesizeOptions, type TTSBackend, type TTSChunk, TTSPlayback, type TTSPlaybackConfig, type TTSPlaybackEvents, TTSPlayer, TTSSpeaker, type TTSSpeakerConfig, type TTSStreamOptions, type TelemetryConfig, type TelemetryExporter, type TelemetryExporterInterface, type TrackDescriptor, type TranscriptResult, type Transition, UnifiedInferenceWorker, type VADBackend, type VADModelInfo, type VADResult, type VADWorkerConfig, type VADWorkerModelInfo, type ValidationResult, type Vec3, VoiceOrchestrator, type VoiceOrchestratorCloudConfig, type VoiceOrchestratorConfig, type VoiceOrchestratorEvents, type VoiceOrchestratorLocalConfig, type VoicePipelineState, type WorkerHealthState, analyzeTextEmotion, applyProfile, blendEmotions, calculatePeak, calculateRMS, configureCacheLimit, configureModelUrls, configureTelemetry, createA2E, createEmotionVector, createKokoroTTS, createSenseVoice, createSileroVAD, createTTSPlayer, fetchWithCache, float32ToPcm16, formatBytes, getCacheConfig, getCacheKey, getEmotionPreset, getModelCache, getOptimalWasmThreads, getRecommendedBackend, getTelemetry, hasWebGPUApi, int16ToFloat32, isAndroid, isIOS, isIOSSafari, isMobile, isSafari, isSpeechRecognitionAvailable, isWebGPUAvailable, lerpBlendshapes, lerpEmotion, listVoices as listKokoroVoices, parseEmotionTags, pcm16ToFloat32, preloadModels, resampleLinear, resetModelUrls, resolveBackend, resolveEmotion, shouldEnableWasmProxy, shouldKeepTrack, shouldUseNativeASR, shouldUseServerA2E, stripMixamoPrefix, ttsToPlaybackFormat, validateTTSInput };
|