JavaScript library that finds the synchronization point between two
similar audio clips.
The
synaudio
library synchronizes two similar audio clips using the
Pearson Correlation Coefficient.
This is implemented using Web Assembly SIMD instructions to used
significantly increase performance. A single and multi-threaded Web Worker
implementation is available as well that further increases performance.
This library is used in
icecast-metadata-player
to synchronize Icecast streaming audio between different connections and
audio codecs.
How to use the demo
Sync Two Clips
- Select two audio clips (one base clip, and one comparison clip).
-
Click Find Correlation to find the sample offset within the base
audio where the comparison audio matches with the best correlation.
-
Play the result audio, which is the comparison audio spliced into the
base audio at the sample offset, to sonically verify the correlation
result.
-
When the correlation coefficient is high (over 50%) the match
will likely align with sample accurate results.
-
When the correlation coefficient is low (under 50%) there is
likely not a match between the base and comparison audio clips.
Sync Multiple Clips
- Select two or more audio clips.
-
Click Find Correlation to find the best match between all the
clips.
-
Play the resulting audio clips(s), which represents the best match(es)
between all the clips, to sonically verify the correlation results.
-
Hover over the Results area to see the list of matches.
-
Each match within Results is a nested array representing a
chain of matching audio clips.