|
| 1 | +{ |
| 2 | + "version": "0.1.0", |
| 3 | + "name": "AnimaSync", |
| 4 | + "description": "Voice-driven 3D avatar animation engine. Generates lip sync, facial expressions, and body motion from audio — entirely client-side via Rust/WASM + ONNX.", |
| 5 | + "url": "https://animasync.quasar.ggls.dev/", |
| 6 | + "provider": { |
| 7 | + "name": "GoodGang Labs", |
| 8 | + "url": "https://goodganglabs.com" |
| 9 | + }, |
| 10 | + "documentation": { |
| 11 | + "summary": "https://animasync.quasar.ggls.dev/llms.txt", |
| 12 | + "full": "https://animasync.quasar.ggls.dev/llms-full.txt", |
| 13 | + "guide": "https://animasync.quasar.ggls.dev/examples/guide/" |
| 14 | + }, |
| 15 | + "install": { |
| 16 | + "npm_v2": "npm install @goodganglabs/lipsync-wasm-v2", |
| 17 | + "npm_v1": "npm install @goodganglabs/lipsync-wasm-v1", |
| 18 | + "peer_dependency": "onnxruntime-web >= 1.17.0", |
| 19 | + "cdn": { |
| 20 | + "onnxruntime": "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.17.0/dist/ort.min.js", |
| 21 | + "v2_wrapper": "https://cdn.jsdelivr.net/npm/@goodganglabs/lipsync-wasm-v2@latest/lipsync-wasm-wrapper.js", |
| 22 | + "v2_wasm": "https://cdn.jsdelivr.net/npm/@goodganglabs/lipsync-wasm-v2@latest/lipsync_wasm_v2.js", |
| 23 | + "v1_wrapper": "https://cdn.jsdelivr.net/npm/@goodganglabs/lipsync-wasm-v1@latest/lipsync-wasm-wrapper.js", |
| 24 | + "v1_wasm": "https://cdn.jsdelivr.net/npm/@goodganglabs/lipsync-wasm-v1@latest/lipsync_wasm_v1.js" |
| 25 | + } |
| 26 | + }, |
| 27 | + "flows": [ |
| 28 | + { |
| 29 | + "id": "quick-start-v2", |
| 30 | + "name": "Quick Start with V2 Engine", |
| 31 | + "description": "Install AnimaSync V2, initialize the engine, and process an audio file to get 52 ARKit blendshape animation frames at 30fps.", |
| 32 | + "agent_instructions": "Use this flow when a developer wants to add lip sync animation to a web app. V2 is recommended for most use cases — simpler integration, direct 52-dim prediction.", |
| 33 | + "steps": [ |
| 34 | + { |
| 35 | + "action": "install", |
| 36 | + "command": "npm install @goodganglabs/lipsync-wasm-v2 onnxruntime-web", |
| 37 | + "description": "Install AnimaSync V2 and ONNX Runtime Web peer dependency" |
| 38 | + }, |
| 39 | + { |
| 40 | + "action": "import", |
| 41 | + "code": "import { LipSyncWasmWrapper } from '@goodganglabs/lipsync-wasm-v2';", |
| 42 | + "description": "Import the LipSyncWasmWrapper class" |
| 43 | + }, |
| 44 | + { |
| 45 | + "action": "initialize", |
| 46 | + "code": "const lipsync = new LipSyncWasmWrapper();\nawait lipsync.init();", |
| 47 | + "description": "Create instance and initialize. Free 30-day trial, no key needed." |
| 48 | + }, |
| 49 | + { |
| 50 | + "action": "process", |
| 51 | + "code": "const result = await lipsync.processFile(audioFile);\nfor (let i = 0; i < result.frame_count; i++) {\n const frame = lipsync.getFrame(result, i); // number[52]\n applyToAvatar(frame);\n}", |
| 52 | + "description": "Process audio file and iterate over 52-dim blendshape frames at 30fps" |
| 53 | + } |
| 54 | + ] |
| 55 | + }, |
| 56 | + { |
| 57 | + "id": "quick-start-v1", |
| 58 | + "name": "Quick Start with V1 Engine", |
| 59 | + "description": "Install AnimaSync V1, initialize, and process audio with full 111-dim expression control. Includes IdleExpressionGenerator and VoiceActivityDetector.", |
| 60 | + "agent_instructions": "Use V1 when the developer needs full expression control (111 dimensions), built-in idle expressions, or voice activity detection. V1 also supports VRM 18-dim mode via getVrmFrame().", |
| 61 | + "steps": [ |
| 62 | + { |
| 63 | + "action": "install", |
| 64 | + "command": "npm install @goodganglabs/lipsync-wasm-v1 onnxruntime-web", |
| 65 | + "description": "Install AnimaSync V1 and ONNX Runtime Web peer dependency" |
| 66 | + }, |
| 67 | + { |
| 68 | + "action": "import", |
| 69 | + "code": "import { LipSyncWasmWrapper } from '@goodganglabs/lipsync-wasm-v1';", |
| 70 | + "description": "Import the LipSyncWasmWrapper class" |
| 71 | + }, |
| 72 | + { |
| 73 | + "action": "initialize", |
| 74 | + "code": "const lipsync = new LipSyncWasmWrapper();\nawait lipsync.init();", |
| 75 | + "description": "Create instance and initialize" |
| 76 | + }, |
| 77 | + { |
| 78 | + "action": "process", |
| 79 | + "code": "const result = await lipsync.processFile(audioFile);\nfor (let i = 0; i < result.frame_count; i++) {\n const frame = lipsync.getVrmFrame(result, i); // number[18] for VRM\n applyToAvatar(frame);\n}", |
| 80 | + "description": "Process audio and use getVrmFrame() for VRM 18-dim output, or getFrame() for full 52-dim ARKit" |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "id": "realtime-mic-streaming", |
| 86 | + "name": "Real-time Microphone Streaming", |
| 87 | + "description": "Capture microphone audio via AudioWorklet and stream chunks to AnimaSync for live avatar animation with ~130-300ms latency.", |
| 88 | + "agent_instructions": "Use this flow for real-time talking avatar applications. Requires AudioWorklet for mic capture at 16kHz. Feed 100ms chunks to processAudioChunk(). Call reset() between utterances.", |
| 89 | + "steps": [ |
| 90 | + { |
| 91 | + "action": "setup-audio", |
| 92 | + "code": "const ctx = new AudioContext({ sampleRate: 16000 });\nconst stream = await navigator.mediaDevices.getUserMedia({ audio: true });\nconst source = ctx.createMediaStreamSource(stream);", |
| 93 | + "description": "Create AudioContext at 16kHz and get microphone stream" |
| 94 | + }, |
| 95 | + { |
| 96 | + "action": "setup-worklet", |
| 97 | + "code": "// AudioWorklet processor captures 1600-sample chunks (100ms at 16kHz)\nawait ctx.audioWorklet.addModule(workletProcessorUrl);\nconst worklet = new AudioWorkletNode(ctx, 'pcm-processor');", |
| 98 | + "description": "Setup AudioWorklet for 100ms chunk capture" |
| 99 | + }, |
| 100 | + { |
| 101 | + "action": "stream-process", |
| 102 | + "code": "worklet.port.onmessage = async (e) => {\n const result = await lipsync.processAudioChunk(e.data);\n if (result) {\n for (let i = 0; i < result.frame_count; i++) {\n frameQueue.push(lipsync.getFrame(result, i));\n }\n }\n};", |
| 103 | + "description": "Feed audio chunks to AnimaSync and queue resulting frames" |
| 104 | + }, |
| 105 | + { |
| 106 | + "action": "render-loop", |
| 107 | + "code": "function render() {\n requestAnimationFrame(render);\n if (frameQueue.length > 0) {\n applyToAvatar(frameQueue.shift());\n }\n}\nrender();", |
| 108 | + "description": "Consume frames at 30fps in animation render loop" |
| 109 | + } |
| 110 | + ] |
| 111 | + }, |
| 112 | + { |
| 113 | + "id": "vrm-avatar-setup", |
| 114 | + "name": "VRM Avatar with Three.js", |
| 115 | + "description": "Load a VRM avatar model using Three.js and @pixiv/three-vrm, then connect AnimaSync for voice-driven animation.", |
| 116 | + "agent_instructions": "Use this flow when building a complete VRM avatar application. Requires three.js, @pixiv/three-vrm, and optionally @pixiv/three-vrm-animation for VRMA body motion.", |
| 117 | + "steps": [ |
| 118 | + { |
| 119 | + "action": "setup-threejs", |
| 120 | + "code": "import * as THREE from 'three';\nimport { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';\nimport { VRMLoaderPlugin } from '@pixiv/three-vrm';", |
| 121 | + "description": "Import Three.js and VRM loader" |
| 122 | + }, |
| 123 | + { |
| 124 | + "action": "load-vrm", |
| 125 | + "code": "const loader = new GLTFLoader();\nloader.register((parser) => new VRMLoaderPlugin(parser));\nconst gltf = await loader.loadAsync(vrmUrl);\nconst vrm = gltf.userData.vrm;\nscene.add(vrm.scene);", |
| 126 | + "description": "Load VRM model and add to Three.js scene" |
| 127 | + }, |
| 128 | + { |
| 129 | + "action": "apply-blendshapes", |
| 130 | + "code": "function applyToAvatar(frame) {\n const names = vrm.expressionManager.expressions.map(e => e.expressionName);\n // Detect mode: ARKit 52 names or VRM preset names\n const isARKit = names.some(n => n.startsWith('mouth') || n.startsWith('jaw'));\n frame.forEach((val, i) => {\n vrm.expressionManager.setValue(blendshapeNames[i], val);\n });\n}", |
| 131 | + "description": "Apply AnimaSync blendshape frames to VRM avatar expressions" |
| 132 | + } |
| 133 | + ] |
| 134 | + }, |
| 135 | + { |
| 136 | + "id": "cdn-no-bundler", |
| 137 | + "name": "CDN Setup (No Bundler)", |
| 138 | + "description": "Use AnimaSync directly from CDN via import maps — no npm or bundler required. Perfect for quick prototypes and demos.", |
| 139 | + "agent_instructions": "Use this when the developer wants the simplest possible setup without npm/bundler. Just an HTML file with import maps pointing to CDN.", |
| 140 | + "steps": [ |
| 141 | + { |
| 142 | + "action": "add-onnx-script", |
| 143 | + "code": "<script src=\"https://cdn.jsdelivr.net/npm/onnxruntime-web@1.17.0/dist/ort.min.js\"></script>", |
| 144 | + "description": "Load ONNX Runtime Web from CDN (must be loaded before AnimaSync)" |
| 145 | + }, |
| 146 | + { |
| 147 | + "action": "add-import-map", |
| 148 | + "code": "<script type=\"importmap\">\n{\n \"imports\": {\n \"three\": \"https://cdn.jsdelivr.net/npm/three@0.179.0/build/three.module.js\",\n \"three/addons/\": \"https://cdn.jsdelivr.net/npm/three@0.179.0/examples/jsm/\",\n \"@pixiv/three-vrm\": \"https://cdn.jsdelivr.net/npm/@pixiv/three-vrm@3.4.0/lib/three-vrm.module.min.js\"\n }\n}\n</script>", |
| 149 | + "description": "Setup import maps for Three.js and VRM dependencies" |
| 150 | + }, |
| 151 | + { |
| 152 | + "action": "init-animasync", |
| 153 | + "code": "<script type=\"module\">\nconst CDN = 'https://cdn.jsdelivr.net/npm/@goodganglabs/lipsync-wasm-v2@0.4.3';\nconst { LipSyncWasmWrapper } = await import(`${CDN}/lipsync-wasm-wrapper.js`);\nconst lipsync = new LipSyncWasmWrapper({ wasmPath: `${CDN}/lipsync_wasm_v2.js` });\nawait lipsync.init();\n</script>", |
| 154 | + "description": "Import and initialize AnimaSync V2 from CDN" |
| 155 | + } |
| 156 | + ] |
| 157 | + } |
| 158 | + ], |
| 159 | + "metadata": { |
| 160 | + "technology": ["Rust", "WebAssembly", "ONNX", "Three.js", "VRM"], |
| 161 | + "keywords": ["lip-sync", "avatar", "animation", "blendshape", "arkit", "vrm", "wasm", "real-time", "browser", "speech", "facial-expression", "body-motion", "onnx"], |
| 162 | + "license": "MIT", |
| 163 | + "pricing": "30-day free trial, then paid license", |
| 164 | + "runtime": "Browser (client-side only, no server required)" |
| 165 | + } |
| 166 | +} |
0 commit comments