Spaces:
Runtime error
Runtime error
File size: 662 Bytes
98caa5c 97b1b16 98caa5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#!/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 |