Query by Humming system in Python