Skip to content

Found a very effective audio sync tool #6

@TiankangXie

Description

@TiankangXie

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions