cut spaces automatic

Hi, I wanna know if it’s possible to cut all spaces from a recording automatically, meaning if in the middle of the recording are quiet spaces it should be cut out with one click, and if there is such an option how do I do that?

Try Effect > Truncate Silence (Ctrl-Z if it doesn’t do what you want).