mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-31 14:58:23 +00:00
fix: path and log
This commit is contained in:
@@ -82,6 +82,7 @@ class AudioAdapter(ABC):
|
|||||||
duration.numpy(),
|
duration.numpy(),
|
||||||
sample_rate.numpy(),
|
sample_rate.numpy(),
|
||||||
dtype=dtype.numpy())
|
dtype=dtype.numpy())
|
||||||
|
get_logger().info('Audio data loaded successfully')
|
||||||
return (data, False)
|
return (data, False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
get_logger().warning(e)
|
get_logger().warning(e)
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ class FFMPEGProcessAudioAdapter(AudioAdapter):
|
|||||||
:param dtype: (Optional) Numpy data type to use, default to float32.
|
:param dtype: (Optional) Numpy data type to use, default to float32.
|
||||||
:returns: Loaded data a (waveform, sample_rate) tuple.
|
:returns: Loaded data a (waveform, sample_rate) tuple.
|
||||||
"""
|
"""
|
||||||
|
if not isinstance(path, str):
|
||||||
|
path = path.decode()
|
||||||
probe = ffmpeg.probe(path)
|
probe = ffmpeg.probe(path)
|
||||||
if 'streams' not in probe or len(probe['streams']) == 0:
|
if 'streams' not in probe or len(probe['streams']) == 0:
|
||||||
raise IOError('No stream was found with ffprobe')
|
raise IOError('No stream was found with ffprobe')
|
||||||
|
|||||||
Reference in New Issue
Block a user