Overview
The Synheart Emotion Swift SDK provides real-time emotion inference from biosignals for native iOS, macOS, and watchOS applications.Installation
Swift Package Manager
Add toPackage.swift:
Requirements
- iOS 13.0+
- Swift 5.9+
Quick Start
Basic Usage
Real-Time with Swift Concurrency
API Reference
EmotionEngine
Methods:
| Method | Description | Returns |
|---|---|---|
fromPretrained(config:) | Load pretrained model | EmotionEngine |
push(hr:rrIntervalsMs:timestamp:) | Push biosignal data | Void |
consumeReady() | Get ready results | [EmotionResult] |
EmotionConfig
Parameters:
| Parameter | Type | Default |
|---|---|---|
windowDuration | TimeInterval | 60.0 (seconds) |
stepDuration | TimeInterval | 5.0 (seconds) |
EmotionResult
Properties:
| Property | Type | Description |
|---|---|---|
emotion | Emotion | Detected emotion |
confidence | Double | Confidence (0-1) |
timestamp | Date | When inferred |
Resources
- Repository: synheart-emotion-swift
- Full README: View on GitHub
Author: Israel Goytom