Overview
The Synheart Emotion Kotlin SDK provides real-time emotion inference from biosignals for native Android applications.Installation
Add tobuild.gradle.kts:
Requirements
- Android API 21+
- Kotlin 1.8+
Quick Start
Basic Usage
Real-Time with Coroutines
API Reference
EmotionEngine
Methods:
| Method | Description | Returns |
|---|---|---|
fromPretrained(config) | Load pretrained model | EmotionEngine |
push(hr, rrIntervalsMs, timestamp) | Push biosignal data | Unit |
consumeReady() | Get ready results | List<EmotionResult> |
EmotionConfig
Parameters:
| Parameter | Type | Default |
|---|---|---|
windowDuration | Long | 60000L (ms) |
stepDuration | Long | 5000L (ms) |
EmotionResult
Properties:
| Property | Type | Description |
|---|---|---|
emotion | Emotion | Detected emotion |
confidence | Double | Confidence (0-1) |
timestamp | Date | When inferred |
Resources
- Repository: synheart-emotion-kotlin
- Full README: View on GitHub
Author: Israel Goytom