From d0bf21e70008c4f2e22ee3fbdd365ccd2827f6b4 Mon Sep 17 00:00:00 2001 From: Parth Parikh Date: Tue, 16 May 2023 16:17:09 -0400 Subject: [PATCH] Remove noise from musicbrainzngs, ffmpeg logs #19 --- radio.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/radio.py b/radio.py index 00fa112..393672f 100644 --- a/radio.py +++ b/radio.py @@ -55,7 +55,7 @@ _logger = logging.getLogger() _logger.setLevel(logging.INFO) - +logging.getLogger('musicbrainzngs').setLevel(logging.WARNING) class _SuppressTTSLogs: """ @@ -498,7 +498,7 @@ def podcast_dialogue(self, rss_feed, start=True): else: speech = ( "Wow! That was something, wasn't it? " - "The podcast you just listened to was" + "The podcast you just listened to was " f"{parsed['title']} from {parsed['itunes_author']}. " "If you enjoyed it, please do check them out." ) @@ -549,6 +549,9 @@ def podcast_clip(self, rss_feed, duration): pipe = subprocess.Popen( [ "ffmpeg", + "-hide_banner", + "-loglevel", + "error", "-i", f"{audio_file}", "-f", @@ -874,7 +877,7 @@ def slow_it_down(self, start_index): src = f"{self.audio_dir}/a{index}.wav" dest = f"{self.audio_dir}/out.wav" slowit = FFmpeg( - global_options=["-y"], + global_options=["-y", "-hide_banner", "-loglevel", "error"], inputs={src: None}, outputs={dest: ["-filter:a", "atempo=0.85"]}, )