Skip to content

Commit

Permalink
Fix spleeter errors after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jan 17, 2021
1 parent 4d9a978 commit 0aed3b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omnizart/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load_audio(audio_path, sampling_rate=44100, mono=True):
Sampling rate of the audio. Will be the same as the given ``sampling_rate``.
"""
try:
audio_loader = adapter.get_default_audio_adapter()
audio_loader = adapter.AudioAdapter.default()
audio, fs = audio_loader.load(audio_path, sample_rate=sampling_rate)
if mono:
audio = librosa.to_mono(audio.squeeze().T)
Expand Down
3 changes: 1 addition & 2 deletions omnizart/vocal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import tensorflow as tf
from spleeter.separator import Separator
from spleeter.utils.logging import get_logger as sp_get_logger
from spleeter.utils.logging import logger as sp_logger

from omnizart.io import load_audio, write_yaml
from omnizart.utils import get_logger, resolve_dataset_type, parallel_generator, ensure_path_exists, LazyLoader
Expand Down Expand Up @@ -38,7 +38,6 @@ def __init__(self, conf_path=None):
super().__init__(VocalSettings, conf_path=conf_path)

# Disable logging information of Spleeter
sp_logger = sp_get_logger()
sp_logger.setLevel(40) # logging.ERROR

def transcribe(self, input_audio, model_path=None, output="./"):
Expand Down

0 comments on commit 0aed3b1

Please sign in to comment.