Skip to content

Commit

Permalink
Remove noise from musicbrainzngs, ffmpeg logs #19
Browse files Browse the repository at this point in the history
  • Loading branch information
pncnmnp committed May 16, 2023
1 parent 8209b94 commit d0bf21e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

_logger = logging.getLogger()
_logger.setLevel(logging.INFO)

logging.getLogger('musicbrainzngs').setLevel(logging.WARNING)

class _SuppressTTSLogs:
"""
Expand Down Expand Up @@ -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."
)
Expand Down Expand Up @@ -549,6 +549,9 @@ def podcast_clip(self, rss_feed, duration):
pipe = subprocess.Popen(
[
"ffmpeg",
"-hide_banner",
"-loglevel",
"error",
"-i",
f"{audio_file}",
"-f",
Expand Down Expand Up @@ -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"]},
)
Expand Down

0 comments on commit d0bf21e

Please # to comment.