add librosa dependency

This commit is contained in:
akhlif
2020-02-27 14:37:02 +01:00
parent d177525ea7
commit 922fcd85bb
3 changed files with 8 additions and 7 deletions

View File

@@ -4,4 +4,5 @@ setuptools>=41.0.0
pandas==0.25.1
tensorflow==1.14.0
ffmpeg-python
norbert==0.2.1
norbert==0.2.1
librosa==0.7.2

View File

@@ -14,7 +14,7 @@ __license__ = 'MIT License'
# Default project values.
project_name = 'spleeter'
project_version = '1.4.9'
project_version = '1.5.0'
tensorflow_dependency = 'tensorflow'
tensorflow_version = '1.14.0'
here = path.abspath(path.dirname(__file__))
@@ -56,6 +56,7 @@ setup(
'pandas==0.25.1',
'requests',
'setuptools>=41.0.0',
'librosa==0.7.2',
'{}=={}'.format(tensorflow_dependency, tensorflow_version),
],
extras_require={

View File

@@ -18,7 +18,6 @@ __author__ = 'Deezer Research'
__license__ = 'MIT License'
placeholder = tf.compat.v1.placeholder
@@ -326,14 +325,14 @@ class EstimatorSpecBuilder(object):
self._build_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
:param stft: input STFT
:param stft_t: input STFT
:returns: inverse STFT (waveform)
"""
inversed = inverse_stft(
tf.transpose(stft, perm=[2, 0, 1]),
tf.transpose(stft_t, perm=[2, 0, 1]),
self._frame_length,
self._frame_step,
window_fn=lambda frame_length, dtype: (
@@ -419,7 +418,7 @@ class EstimatorSpecBuilder(object):
output = output_dict[f'{instrument}_spectrogram']
# Compute mask with the model.
instrument_mask = (output ** separation_exponent
+ (self.EPSILON / len(output_dict))) / output_sum
+ (self.EPSILON / len(output_dict))) / output_sum
# Extend mask;
instrument_mask = self._extend_mask(instrument_mask)
# Stack back mask.