verbanote-server/verbanote/model.py

19 lines
386 B
Python
Raw Normal View History

2023-08-20 09:26:15 +00:00
# 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
# set up locale
import locale
locale.getpreferredencoding = lambda: "UTF-8"
# prepend silent audio to clip
from pydub import AudioSegment
spacermilli = 2000
spacer = AudioSegment.silent(duration=spacermilli)
audio = AudioSegment.from_wav("input.wav")
audio = spacer.append(audio, crossfade=0)
audio.export('input_prep.wav', format='wav')