facesync icon indicating copy to clipboard operation
facesync copied to clipboard

Found a very effective audio sync tool

Open TiankangXie opened this issue 3 years ago • 0 comments

Just wanted to share with you and the lab about this useful python toolbox on audio sync: https://github.com/benfmiller/audalign Very effective on my FNL alignment tasks.

import audalign as ad

fingerprint_rec = ad.FingerprintRecognizer()
correlation_rec = ad.CorrelationRecognizer()
cor_spec_rec = ad.CorrelationSpectrogramRecognizer()
visual_rec = ad.VisualRecognizer()

fingerprint_rec.config.set_accuracy(3)

# we want to align the two audio files: s18_chunk7.wav with s18_audio.wav 
results = ad.align_files("/Storage/Projects/iEEG/aligning_folder/s18_chunk7.wav", "/Storage/Projects/iEEG/aligning_folder/s18_audio.wav", recognizer=fingerprint_rec)

# results can then be sent to fine_align
fine_results = ad.fine_align(
    results,
    recognizer=cor_spec_rec,
)

print(fine_results)

TiankangXie avatar Jan 13 '23 00:01 TiankangXie