https://github.com/yuao/audioalignment
Estimation of audio alignment relative to a given reference.
https://github.com/yuao/audioalignment
audio audio-alignment audio-analysis fourier-transform spectrum
Last synced: 8 months ago
JSON representation
Estimation of audio alignment relative to a given reference.
- Host: GitHub
- URL: https://github.com/yuao/audioalignment
- Owner: YuAo
- License: mit
- Created: 2021-08-15T15:52:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T10:20:28.000Z (over 4 years ago)
- Last Synced: 2025-04-12T15:11:26.640Z (about 1 year ago)
- Topics: audio, audio-alignment, audio-analysis, fourier-transform, spectrum
- Language: Swift
- Homepage:
- Size: 838 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AudioAlignment

Estimation of audio alignment relative to a given reference, using shift-invariant fingerprints of the spectrum.
## Usage
```swift
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](https://yuao.github.io/AudioAlignment/documentation/audioalignment)
## Swift Package
To use this package in a SwiftPM project, add the following line to the dependencies in your Package.swift file:
```swift
.package(url: "https://github.com/YuAo/AudioAlignment.git", from: "1.0.0"),
```
## Performance
[Accelerate](https://developer.apple.com/documentation/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](https://github.com/ranwsn/Audio_Snippets_Alignment)
### Dejavu
[worldveil/dejavu](https://github.com/worldveil/dejavu)
### Example Audio
Endless Light
by Siddhartha Corsus
https://creativecommons.org/licenses/by-nc/4.0/