Syncing up two audio files

Is there a way to sync two audio files in a similar way subtitle synchronisation works (setting timestamps where it aligns and then stretching the clips inbetween accordingly), where one of the files is slower or faster at different points.