This is a feature request to sync one audio track to another, given 2 points on source file and 2 points on destination file.
That would automatically adjust the tempo speed + shift the track trimming or adding silence at the beginning.
This is helpful for example when adding additional audio tracks to a movie in a different language.
The way it has to be done now involved complex calculations, interpolation what the optimal speed/tempo would be based on a part of it. Plus you have to later on shift the track + possibly repeat the process several times.
Example: move orange points from B track to match green points from A track, leaving the timeline of track A untouched. Of course include left and right channels or desired channel.
Actually, no calculations are required in 2.4.2. Simply jot down the target length. Then when performing change speed or change tempo, simply enter the target length. Audacity does all of those heavy calculations for you. And, more accurately to boot!
This is a rather lengthy example, but hopefully will illustrate clearly the technique. You will probably find quicker ways once you’ve got the hang of it.
Using the image in this post as an example: Sync one audio track to another by 2 points
With the Time Shift Tool, drag the second to the right so that the first marked peak in track B lines up with the first marked peak in track A. Zoom in as necessary to align them precisely (I use “Ctrl + Mouse Wheel” for zooming, but whatever method you find easiest: Zooming Overview - Audacity Manual)
Select from the first marked peak in track A to the second marked peak in track A
(see: Selecting Audio - Audacity Manual). Again, use Zoom as necessary to make the selection as precise as possible.