Skip to content

LarryWangCA/DAF

Repository files navigation

🎧 iOS Delayed Auditory Feedback (DAF) System

This project implements a real-time Delayed Auditory Feedback (DAF) system on iOS using SwiftUI, AVFoundation, and Accelerate.
The app measures the device’s loopback latency and automatically compensates it to ensure accurate feedback delay for speech research and clinical testing.


🧠 Overview

  • Measures internal audio latency by playing and recording an impulse, then calculating the delay using cross-correlation (vDSP).
  • Applies user-defined DAF delay (50–200 ms) by adjusting an AVAudioUnitDelay node to achieve precise total feedback timing.
  • Simple SwiftUI interface for:
    • Measuring latency
    • Setting desired delay
    • Starting/stopping DAF in real time

⚙️ Usage

  1. Tap “Measure Latency” to automatically determine internal device delay.
  2. Enter a desired delay between 50–200 ms.
  3. Press “Start DAF” to begin delayed feedback; “Stop DAF” to end.

Requires testing on a real iOS device (not the simulator). For best accuracy, use a USB or wired microphone such as the RØDE AI-Micro.


🧩 Technologies

  • SwiftUI – modern iOS UI framework
  • AVFoundation – audio engine and delay control
  • Accelerate (vDSP) – signal correlation and latency estimation

👤 Author

Liwei Wang
Ph.D. Candidate, Electrical & Computer Engineering
Western University, Canada


About

current implementation for the iOS based DAF app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages