mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-30 12:22:58 +00:00
refactor: move audio package from utils to top
This commit is contained in:
2
setup.py
2
setup.py
@@ -51,13 +51,13 @@ setup(
|
||||
license='MIT License',
|
||||
packages=[
|
||||
'spleeter',
|
||||
'spleeter.audio',
|
||||
'spleeter.commands',
|
||||
'spleeter.model',
|
||||
'spleeter.model.functions',
|
||||
'spleeter.model.provider',
|
||||
'spleeter.resources',
|
||||
'spleeter.utils',
|
||||
'spleeter.utils.audio',
|
||||
],
|
||||
package_data={'spleeter.resources': ['*.json']},
|
||||
python_requires='>=3.6, <3.8',
|
||||
|
||||
@@ -20,8 +20,8 @@ import tensorflow as tf
|
||||
import numpy as np
|
||||
# pylint: enable=import-error
|
||||
|
||||
from ..utils.audio.adapter import get_audio_adapter
|
||||
from ..utils.audio.convertor import to_n_channels
|
||||
from ..audio.adapter import get_audio_adapter
|
||||
from ..audio.convertor import to_n_channels
|
||||
from ..utils.estimator import create_estimator
|
||||
from ..utils.tensor import set_tensor_shape
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ from functools import partial
|
||||
import tensorflow as tf
|
||||
# pylint: enable=import-error
|
||||
|
||||
from ..audio.adapter import get_audio_adapter
|
||||
from ..dataset import get_training_dataset, get_validation_dataset
|
||||
from ..model import model_fn
|
||||
from ..utils.audio.adapter import get_audio_adapter
|
||||
from ..utils.logging import get_logger
|
||||
|
||||
__email__ = 'research@deezer.com'
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
# coding: utf8
|
||||
|
||||
"""
|
||||
Module for building data preprocessing pipeline using the tensorflow data
|
||||
API.
|
||||
Data preprocessing such as audio loading, spectrogram computation, cropping,
|
||||
feature caching or data augmentation is done using a tensorflow dataset object
|
||||
that output a tuple (input_, output) where:
|
||||
- input_ is a dictionary with a single key that contains the (batched) mix
|
||||
spectrogram of audio samples
|
||||
- output is a dictionary of spectrogram of the isolated tracks (ground truth)
|
||||
Module for building data preprocessing pipeline using the tensorflow
|
||||
data API. Data preprocessing such as audio loading, spectrogram
|
||||
computation, cropping, feature caching or data augmentation is done
|
||||
using a tensorflow dataset object that output a tuple (input_, output)
|
||||
where:
|
||||
|
||||
- input is a dictionary with a single key that contains the (batched)
|
||||
mix spectrogram of audio samples
|
||||
- output is a dictionary of spectrogram of the isolated tracks
|
||||
(ground truth)
|
||||
"""
|
||||
|
||||
import time
|
||||
@@ -23,10 +24,10 @@ import numpy as np
|
||||
import tensorflow as tf
|
||||
# pylint: enable=import-error
|
||||
|
||||
from .utils.audio.convertor import (
|
||||
from .audio.convertor import (
|
||||
db_uint_spectrogram_to_gain,
|
||||
spectrogram_to_db_uint)
|
||||
from .utils.audio.spectrogram import (
|
||||
from .audio.spectrogram import (
|
||||
compute_spectrogram_tf,
|
||||
random_pitch_shift,
|
||||
random_time_stretch)
|
||||
|
||||
@@ -20,9 +20,9 @@ from multiprocessing import Pool
|
||||
from pathlib import Path
|
||||
from os.path import join
|
||||
|
||||
from .audio.adapter import get_default_audio_adapter
|
||||
from .audio.convertor import to_stereo
|
||||
from .model import model_fn
|
||||
from .utils.audio.adapter import get_default_audio_adapter
|
||||
from .utils.audio.convertor import to_stereo
|
||||
from .utils.configuration import load_configuration
|
||||
from .utils.estimator import create_estimator, to_predictor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user