M5: camera expression cues via MediaPipe Face Landmarker
- CameraX ImageAnalysis + Face Landmarker (CPU, 10Hz, KEEP_ONLY_LATEST) - Rule-based blendshape mapping: smiling/brow_furrowed/gaze/blink/face_presence - Camera off by default, explicit user toggle, no image storage/upload - Expression cues displayed as passive labels, never affect dialogue flow - CameraX pinned 1.4.2 (compileSdk 34 compat), MediaPipe tasks-vision 1.1.0 - Face model bundled: face_landmarker.task (sha256 TOFU recorded) - docs/EXPRESSION.md with rules table and privacy notes - Version 0.2.0-m5
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Pure Kotlin synthetic-rule checks, no Gradle daemon, CAMERA, network or new dependencies.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
source /home/ubuntu/android-build/env.sh
|
||||
cd "$ROOT"
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
cache = Path(os.environ['GRADLE_USER_HOME']) / 'caches/modules-2/files-2.1'
|
||||
def jar(group, name, version):
|
||||
return str(next((cache / group / name / version).glob('*/*.jar')))
|
||||
stdlib = jar('org.jetbrains.kotlin', 'kotlin-stdlib', '2.0.20')
|
||||
compiler = ':'.join([
|
||||
jar('org.jetbrains.kotlin', 'kotlin-compiler-embeddable', '2.0.20'), stdlib,
|
||||
jar('org.jetbrains.kotlin', 'kotlin-reflect', '1.6.10'),
|
||||
jar('org.jetbrains.kotlin', 'kotlin-script-runtime', '2.0.20'),
|
||||
jar('org.jetbrains.intellij.deps', 'trove4j', '1.0.20200330'),
|
||||
jar('org.jetbrains', 'annotations', '23.0.0'),
|
||||
str(next((cache / 'org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm').glob('*/*/*.jar'))),
|
||||
])
|
||||
java = str(Path(os.environ['JAVA_HOME']) / 'bin/java')
|
||||
with tempfile.TemporaryDirectory(prefix='lan-voice-expression-check-') as output:
|
||||
subprocess.run([java, '-cp', compiler, 'org.jetbrains.kotlin.cli.jvm.K2JVMCompiler',
|
||||
'-no-stdlib', '-no-reflect', '-jvm-target', '17', '-classpath', stdlib, '-d', output,
|
||||
'app/src/main/java/com/gorios/lanvoice/expression/ExpressionRules.kt',
|
||||
'tests/expression/ExpressionRulesCheck.kt'], check=True)
|
||||
subprocess.run([java, '-cp', output + ':' + stdlib, 'ExpressionRulesCheckKt'], check=True)
|
||||
PY
|
||||
Reference in New Issue
Block a user