|
|
|
|
|
|
|
|
|
|
|
|
|
import os |
|
import pandas as pd |
|
from pandas.core.frame import DataFrame |
|
|
|
from tqdm import tqdm, tqdm_pandas |
|
tqdm.pandas() |
|
|
|
import librosa |
|
import librosa.display |
|
|
|
import matplotlib.pyplot as plt |
|
|
|
def Data_Generator(): |
|
list_test = [] |
|
for j in os.listdir('./test/'): |
|
list_test.append('./test/'+j) |
|
fname = list_test[0] |
|
return fname |
|
|
|
def Audio(fname,SAMPLE_RATE): |
|
|
|
y, sr = librosa.load(fname, sr=SAMPLE_RATE) |
|
|
|
plt.figure() |
|
librosa.display.waveplot(y, sr) |
|
plt.title('Waveplot of unknow frog sound') |
|
plt.show() |
|
return y,sr |