|
|
|
@ -231,6 +231,7 @@ def ensure_tensor(
|
|
|
|
|
|
|
|
|
|
def _get_value(other):
|
|
|
|
|
#
|
|
|
|
|
from .audio_signal import AudioSignal
|
|
|
|
|
if isinstance(other, AudioSignal):
|
|
|
|
|
return other.audio_data
|
|
|
|
|
return other
|
|
|
|
@ -781,6 +782,8 @@ def collate(list_of_dicts: list, n_splits: int=None):
|
|
|
|
|
Dictionary containing batched data.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from .audio_signal import AudioSignal
|
|
|
|
|
|
|
|
|
|
batches = []
|
|
|
|
|
list_len = len(list_of_dicts)
|
|
|
|
|
|
|
|
|
@ -870,6 +873,7 @@ def generate_chord_dataset(
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
import librosa
|
|
|
|
|
from .audio_signal import AudioSignal
|
|
|
|
|
from ..data.preprocess import create_csv
|
|
|
|
|
|
|
|
|
|
min_midi = librosa.note_to_midi(min_note)
|
|
|
|
|