mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-31 14:58:23 +00:00
add librosa dependency
This commit is contained in:
@@ -4,4 +4,5 @@ setuptools>=41.0.0
|
|||||||
pandas==0.25.1
|
pandas==0.25.1
|
||||||
tensorflow==1.14.0
|
tensorflow==1.14.0
|
||||||
ffmpeg-python
|
ffmpeg-python
|
||||||
norbert==0.2.1
|
norbert==0.2.1
|
||||||
|
librosa==0.7.2
|
||||||
3
setup.py
3
setup.py
@@ -14,7 +14,7 @@ __license__ = 'MIT License'
|
|||||||
|
|
||||||
# Default project values.
|
# Default project values.
|
||||||
project_name = 'spleeter'
|
project_name = 'spleeter'
|
||||||
project_version = '1.4.9'
|
project_version = '1.5.0'
|
||||||
tensorflow_dependency = 'tensorflow'
|
tensorflow_dependency = 'tensorflow'
|
||||||
tensorflow_version = '1.14.0'
|
tensorflow_version = '1.14.0'
|
||||||
here = path.abspath(path.dirname(__file__))
|
here = path.abspath(path.dirname(__file__))
|
||||||
@@ -56,6 +56,7 @@ setup(
|
|||||||
'pandas==0.25.1',
|
'pandas==0.25.1',
|
||||||
'requests',
|
'requests',
|
||||||
'setuptools>=41.0.0',
|
'setuptools>=41.0.0',
|
||||||
|
'librosa==0.7.2',
|
||||||
'{}=={}'.format(tensorflow_dependency, tensorflow_version),
|
'{}=={}'.format(tensorflow_dependency, tensorflow_version),
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ __author__ = 'Deezer Research'
|
|||||||
__license__ = 'MIT License'
|
__license__ = 'MIT License'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
placeholder = tf.compat.v1.placeholder
|
placeholder = tf.compat.v1.placeholder
|
||||||
|
|
||||||
|
|
||||||
@@ -326,14 +325,14 @@ class EstimatorSpecBuilder(object):
|
|||||||
self._build_masked_stfts()
|
self._build_masked_stfts()
|
||||||
return self._masked_stfts
|
return self._masked_stfts
|
||||||
|
|
||||||
def _inverse_stft(self, stft, time_crop=None):
|
def _inverse_stft(self, stft_t, time_crop=None):
|
||||||
""" Inverse and reshape the given STFT
|
""" Inverse and reshape the given STFT
|
||||||
|
|
||||||
:param stft: input STFT
|
:param stft_t: input STFT
|
||||||
:returns: inverse STFT (waveform)
|
:returns: inverse STFT (waveform)
|
||||||
"""
|
"""
|
||||||
inversed = inverse_stft(
|
inversed = inverse_stft(
|
||||||
tf.transpose(stft, perm=[2, 0, 1]),
|
tf.transpose(stft_t, perm=[2, 0, 1]),
|
||||||
self._frame_length,
|
self._frame_length,
|
||||||
self._frame_step,
|
self._frame_step,
|
||||||
window_fn=lambda frame_length, dtype: (
|
window_fn=lambda frame_length, dtype: (
|
||||||
@@ -419,7 +418,7 @@ class EstimatorSpecBuilder(object):
|
|||||||
output = output_dict[f'{instrument}_spectrogram']
|
output = output_dict[f'{instrument}_spectrogram']
|
||||||
# Compute mask with the model.
|
# Compute mask with the model.
|
||||||
instrument_mask = (output ** separation_exponent
|
instrument_mask = (output ** separation_exponent
|
||||||
+ (self.EPSILON / len(output_dict))) / output_sum
|
+ (self.EPSILON / len(output_dict))) / output_sum
|
||||||
# Extend mask;
|
# Extend mask;
|
||||||
instrument_mask = self._extend_mask(instrument_mask)
|
instrument_mask = self._extend_mask(instrument_mask)
|
||||||
# Stack back mask.
|
# Stack back mask.
|
||||||
|
|||||||
Reference in New Issue
Block a user