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:
+20
-1
@@ -4,6 +4,19 @@ plugins {
|
||||
id 'org.jetbrains.kotlin.plugin.compose'
|
||||
}
|
||||
|
||||
// Populated once by scripts/prepare-expression.sh from stable Maven versions, then pinned.
|
||||
def expressionVersions = new Properties()
|
||||
def expressionVersionFile = rootProject.file('gradle/expression-versions.properties')
|
||||
if (!expressionVersionFile.isFile()) {
|
||||
throw new GradleException('Run ./scripts/prepare-expression.sh in the external shell before building M5')
|
||||
}
|
||||
expressionVersionFile.withInputStream { expressionVersions.load(it) }
|
||||
def cameraVersion = expressionVersions.getProperty('camerax.version')
|
||||
def mediaPipeVersion = expressionVersions.getProperty('mediapipe.version')
|
||||
if (!cameraVersion || !mediaPipeVersion) {
|
||||
throw new GradleException('Incomplete gradle/expression-versions.properties; run scripts/prepare-expression.sh')
|
||||
}
|
||||
|
||||
// Android's <domain> text cannot reference @string. Generate it from the one address config
|
||||
// so changing voice_server_host and rebuilding also updates the certificate trust scope.
|
||||
def networkSecurityResources = layout.buildDirectory.dir('generated/networkSecurity/res')
|
||||
@@ -33,12 +46,13 @@ android {
|
||||
minSdk 26
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName '0.1.0-m2'
|
||||
versionName '0.2.0-m5'
|
||||
ndk { abiFilters 'arm64-v8a' }
|
||||
}
|
||||
compileOptions { sourceCompatibility JavaVersion.VERSION_17; targetCompatibility JavaVersion.VERSION_17 }
|
||||
kotlinOptions { jvmTarget = '17' }
|
||||
buildFeatures { compose true }
|
||||
androidResources { noCompress += ['task'] }
|
||||
sourceSets.main.res.srcDir(networkSecurityResources)
|
||||
}
|
||||
tasks.named('preBuild').configure { dependsOn(generateNetworkSecurityConfig) }
|
||||
@@ -48,4 +62,9 @@ dependencies {
|
||||
implementation 'androidx.compose.material3:material3'
|
||||
implementation 'androidx.activity:activity-compose:1.9.3'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||
implementation "com.google.mediapipe:tasks-vision:$mediaPipeVersion"
|
||||
implementation "androidx.camera:camera-core:$cameraVersion"
|
||||
implementation "androidx.camera:camera-camera2:$cameraVersion"
|
||||
implementation "androidx.camera:camera-lifecycle:$cameraVersion"
|
||||
implementation "androidx.camera:camera-view:$cameraVersion"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user