Skip to content

Estimation of audio alignment relative to a given reference.

License

Notifications You must be signed in to change notification settings

YuAo/AudioAlignment

Repository files navigation

AudioAlignment

Estimation of audio alignment relative to a given reference, using shift-invariant fingerprints of the spectrum.

Usage

import AudioAlignment

let sample = try AudioFingerprint(audioURL: URL(fileURLWithPath: "sample.m4a"))
let reference = try AudioFingerprint(audioURL: URL(fileURLWithPath: "reference.m4a"))
let timeOffset = try sample.align(with: reference).estimatedTimeOffset

Documentation

API Reference

Swift Package

To use this package in a SwiftPM project, add the following line to the dependencies in your Package.swift file:

.package(url: "https://github.com/YuAo/AudioAlignment.git", from: "1.0.0"),

Performance

Accelerate is used to boost performance.

For a one-minute audio, the fingerprint generation takes approximately 60ms on a 2019 Intel iMac with i5 processor (in release mode).

Acknowledgements

Audio_Snippets_Alignment

ranwsn/Audio_Snippets_Alignment

Dejavu

worldveil/dejavu

Example Audio

Endless Light

by Siddhartha Corsus

https://creativecommons.org/licenses/by-nc/4.0/