Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # In[ ]: | |
| 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('./'): | |
| list_test.append('./'+j) | |
| fname = list_test[0] | |
| return fname | |
| def Audio(fname,SAMPLE_RATE): | |
| # ζεζει³ι »θ³ζ | |
| y, sr = librosa.load(fname, sr=SAMPLE_RATE) | |
| # plot a waveform | |
| plt.figure() | |
| librosa.display.waveplot(y, sr) | |
| plt.title('Waveplot of unknow frog sound') | |
| plt.show() | |
| return y,sr |