From a49121bb15804378d58d3c8d64db23124cd9dbd7 Mon Sep 17 00:00:00 2001 From: Ryan McCauley Date: Sun, 24 Mar 2024 20:13:03 -0700 Subject: [PATCH] Update audio_segment.py If bitrate is passed in as int, convert to str --- pydub/audio_segment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydub/audio_segment.py b/pydub/audio_segment.py index 3b9e2881..d0600e7a 100644 --- a/pydub/audio_segment.py +++ b/pydub/audio_segment.py @@ -924,7 +924,7 @@ def export(self, out_f=None, format='mp3', codec=None, bitrate=None, parameters= conversion_command.extend(["-acodec", codec]) if bitrate is not None: - conversion_command.extend(["-b:a", bitrate]) + conversion_command.extend(["-b:a", str(bitrate) if type(bitrate)==int else bitrate]) if parameters is not None: # extend arguments with arbitrary set