You can use Praat to modify the relative durations in an existing sound.
First, you select a Sound object and click "To Manipulation". A Manipulation object will then appear in the list. You can then click View & Edit to raise a ManipulationEditor, which will show an empty DurationTier. You can add targets to this tier by choosing "Add duration point at cursor" from the "Dur" menu. The targets will show up as blue dots, which you can easily drag around the duration area.
If you click any of the rectangles (or choose any of the Play commands from the View menu), you will hear the modified sound. By shift-clicking, you will hear the original sound.
To get the modified sound as a separate object, choose Publish resynthesis from the File menu.
If you modify the pitch curve as well (see Intro 8.1. Manipulation of pitch), the modified sound will be based on the modified duration and pitch.
If you know exactly the times and relative durations, it is advisable to write a script (see Scripting). Suppose, for instance, that you have a 355-ms piece of sound, and you want to shorten the first 85 ms to 70 ms, and the remaining 270 ms to 200 ms.
In your first 85 ms, your relative duration should be 70/85, and during the last 270 ms, it should be 200/270. The DurationTier does linear interpolation, so it can only be approximate these precise times, but fortunately to any precision you like:
Create DurationTier: "shorten", 0, 0.085 + 0.270
Add point: 0.000, 70/85
Add point: 0.084999, 70/85
Add point: 0.085001, 200/270
Add point: 0.355, 200/270
To put this DurationTier back into a Manipulation object, you select the two objects together (e.g. a click on the DurationTier and a Command-click on the Manipulation), and choose Replace duration tier.
© ppgb, September 1, 2020