Play sounds as a soundbox.
pip install -e git+https://github.com/avara1986/pysoundbox.git#egg=pysoundbox
>> pysoundbox
To add a script command to a key shorcut, see config folder and this doc:
Gnome: see this link
KDE: see this link
sudo apt install mpg321
Use Pydub and install dependencies
from pydub import AudioSegment
sound = AudioSegment.from_mp3("[AUDIO_FILE].mp3")
new_sound = sound[18*1000:22*1000]
new_sound.export("[NEW_AUDIO_FILE].mp3", format="mp3")