simple vae style model
This commit is contained in:
9
data.py
9
data.py
@@ -22,15 +22,9 @@ def process_file(file_path):
|
||||
end = start_pos + size
|
||||
if end <= sample_len:
|
||||
chunk = y[start_pos:end]
|
||||
chunk = librosa.feature.melspectrogram(y=chunk, sr=SAMPLE_RATE)
|
||||
chunk = ((librosa.amplitude_to_db(chunk,ref=np.max)+80)/80)
|
||||
|
||||
#chunk = librosa.feature.melspectrogram(y=chunk,sr=SAMPLE_RATE)
|
||||
#chunk = ((librosa.amplitude_to_db(chunk,ref=np.max)+40)/40)
|
||||
file_chunks.append(chunk)
|
||||
return file_chunks
|
||||
|
||||
#@mlflow.trace
|
||||
def load():
|
||||
"""
|
||||
Load 10 second chunks of songs.
|
||||
@@ -44,9 +38,6 @@ def load():
|
||||
audio.extend(l)
|
||||
return audio
|
||||
|
||||
|
||||
|
||||
##DEP
|
||||
def audio_split(audio):
|
||||
"""
|
||||
Split 10 seconds of audio to 2 5 second clips
|
||||
|
||||
Reference in New Issue
Block a user