/pysoundbox

Play sounds as a soundbox with Python

Primary LanguagePython

pysoundbox

Play sounds as a soundbox.

Installation

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

Requirements

sudo apt install mpg321

Pythonic way to create audios

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")