From 48b54f244718ec4c3de5b89604e665b370a40206 Mon Sep 17 00:00:00 2001 From: twardoch Date: Thu, 6 Jul 2023 14:13:19 +0200 Subject: [PATCH] v1.3.5 --- README.md | 3 ++- src/audiostretchy/stretch.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e183906..d6c6d5d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ AudioStretchy is a Python library and CLI tool that which performs fast, high-quality time-stretching of WAV/MP3 files without changing their pitch. Works well for speech, can time-stretch silence separately. The library is a wrapper around David Bryant’s [audio-stretch](https://github.com/dbry/audio-stretch) C library. -_Version: 1.3.4_ +_Version: 1.3.5_ ## Features @@ -149,6 +149,7 @@ audio_stretch.save(file=WAVDataAsBytesIO, format="wav") ## Changelog +- v1.3.5: fix for MP3 writing - v1.3.2: fix for MP3 opening - v1.3.0: actually working on Windows as well - v1.2.x: working on macOS and Linux diff --git a/src/audiostretchy/stretch.py b/src/audiostretchy/stretch.py index fff24a1..f82e642 100644 --- a/src/audiostretchy/stretch.py +++ b/src/audiostretchy/stretch.py @@ -151,7 +151,7 @@ def save_mp3(self, audio_file: BinaryIO, bit_rate: int = 128, quality: int = 5): encoder.set_sample_rate(self.framerate) encoder.set_channels(self.nchannels) encoder.set_quality(quality) - encoder.set_mod( + encoder.set_mode( mp3.MODE_STEREO if nchannels == 2 else mp3.MODE_SINGLE_CHANNEL ) encoder.write(self.pcm)