{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport librosa\nfrom IPython.display import Audio, display\nimport IPython\nimport librosa.display","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-07-29T04:09:32.402028Z","iopub.execute_input":"2022-07-29T04:09:32.402733Z","iopub.status.idle":"2022-07-29T04:09:32.407698Z","shell.execute_reply.started":"2022-07-29T04:09:32.402697Z","shell.execute_reply":"2022-07-29T04:09:32.406619Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from glob import glob\n\nfilenames = glob('../input/dlsprint/train_files/*.*')\n","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:09:34.534680Z","iopub.execute_input":"2022-07-29T04:09:34.535019Z","iopub.status.idle":"2022-07-29T04:09:35.275507Z","shell.execute_reply.started":"2022-07-29T04:09:34.534990Z","shell.execute_reply":"2022-07-29T04:09:35.274519Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#filenames[29:39]","metadata":{"_kg_hide-output":false,"execution":{"iopub.status.busy":"2022-07-29T03:35:46.301998Z","iopub.execute_input":"2022-07-29T03:35:46.302524Z","iopub.status.idle":"2022-07-29T03:35:46.307553Z","shell.execute_reply.started":"2022-07-29T03:35:46.302472Z","shell.execute_reply":"2022-07-29T03:35:46.306463Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Converts Mp3 to Array ","metadata":{}},{"cell_type":"code","source":"def audio_read(filename):\n    audio , sr = librosa.load(filename)\n    return audio,sr","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:09:38.029272Z","iopub.execute_input":"2022-07-29T04:09:38.029865Z","iopub.status.idle":"2022-07-29T04:09:38.034840Z","shell.execute_reply.started":"2022-07-29T04:09:38.029828Z","shell.execute_reply":"2022-07-29T04:09:38.033882Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# index = np.random.randint(0,len(filenames),size=(1,10))\n# # print(index.shape)\n# print(index)\n# #[[ 99482 152826  49814 139975  30356  20870 162392 150720 194693  63630]]","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:09:44.228887Z","iopub.execute_input":"2022-07-29T04:09:44.229252Z","iopub.status.idle":"2022-07-29T04:09:44.235237Z","shell.execute_reply.started":"2022-07-29T04:09:44.229223Z","shell.execute_reply":"2022-07-29T04:09:44.234136Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"index = [[45674, 101247,  70522,  47339,   7526, 124206, 109442, 104084,  62037, 173402]]","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:10:26.485132Z","iopub.execute_input":"2022-07-29T04:10:26.485743Z","iopub.status.idle":"2022-07-29T04:10:26.490995Z","shell.execute_reply.started":"2022-07-29T04:10:26.485708Z","shell.execute_reply":"2022-07-29T04:10:26.489667Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# This next section shows the wavform of 10 random audio and displays them","metadata":{}},{"cell_type":"markdown","source":"**1st**","metadata":{}},{"cell_type":"code","source":"import matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:10:29.083133Z","iopub.execute_input":"2022-07-29T04:10:29.083497Z","iopub.status.idle":"2022-07-29T04:10:29.088045Z","shell.execute_reply.started":"2022-07-29T04:10:29.083467Z","shell.execute_reply":"2022-07-29T04:10:29.087051Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f'{index[0][0]} th file')\naudio1, sr1 = audio_read(filenames[index[0][0]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'পরিস্কার কথা । কোন নয়েজ নেই')\nIPython.display.Audio(filenames[index[0][0]], autoplay=False)\n\n#বিশৃঙ্খল কংগ্রেস-টিইউজেএস জোট সরকারের আমলে পত্রিকাটির উপর প্রচণ্ড আক্রমণ চালানো হয়েছিল।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:10:31.567773Z","iopub.execute_input":"2022-07-29T04:10:31.568649Z","iopub.status.idle":"2022-07-29T04:10:32.531094Z","shell.execute_reply.started":"2022-07-29T04:10:31.568611Z","shell.execute_reply":"2022-07-29T04:10:32.530105Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**2nd**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][1]} th file')\naudio1, sr1 = audio_read(filenames[index[0][1]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'বাক্য শুরু করার আগে এক সেকেন্ডের জন্য একটি নয়েজ শোনা যায় ')\nIPython.display.Audio(filenames[index[0][1]], autoplay=False)\n\n#তারা গ্রীষ্মে হাঙ্গেরিতে ছড়িয়ে পড়ে।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:24:31.828478Z","iopub.execute_input":"2022-07-29T04:24:31.828862Z","iopub.status.idle":"2022-07-29T04:24:32.832272Z","shell.execute_reply.started":"2022-07-29T04:24:31.828831Z","shell.execute_reply":"2022-07-29T04:24:32.831075Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**3rd**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][2]} th file')\naudio1, sr1 = audio_read(filenames[index[0][2]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'ভয়েস লো কিন্তু পরিস্কার এবং কোন নয়েজ নেই')\nIPython.display.Audio(filenames[index[0][2]], autoplay=False)\n\n#বিভিন্ন পরিসর আলাদা করাও দেয়ালের অন্যতম কাজ।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:10:52.391503Z","iopub.execute_input":"2022-07-29T04:10:52.391861Z","iopub.status.idle":"2022-07-29T04:10:53.363259Z","shell.execute_reply.started":"2022-07-29T04:10:52.391831Z","shell.execute_reply":"2022-07-29T04:10:53.362160Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**4th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][3]} th file')\naudio1, sr1 = audio_read(filenames[index[0][3]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'কথা পরিস্কার কিন্তু প্রথমে একটি নয়েজ আছে')\nIPython.display.Audio(filenames[index[0][3]], autoplay=False)\n\n#এগুলো পরে সংযোজন করা হয়েছে।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:30:02.089579Z","iopub.execute_input":"2022-07-29T04:30:02.090493Z","iopub.status.idle":"2022-07-29T04:30:03.088162Z","shell.execute_reply.started":"2022-07-29T04:30:02.090432Z","shell.execute_reply":"2022-07-29T04:30:03.087191Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**5th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][4]} th file')\naudio1, sr1 = audio_read(filenames[index[0][4]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'মাঝে কথা হারিয়ে গেছে এবং সম্ভবত পিতৃপরিচয় কথাটি বলতে ভুল করেছে ')\nIPython.display.Audio(filenames[index[0][4]], autoplay=False)\n\n# ঘটনাচক্রে বিজয়ের পিতৃপরিচয় উন্মোচিত হল।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:32:31.927616Z","iopub.execute_input":"2022-07-29T04:32:31.927989Z","iopub.status.idle":"2022-07-29T04:32:32.932375Z","shell.execute_reply.started":"2022-07-29T04:32:31.927958Z","shell.execute_reply":"2022-07-29T04:32:32.931131Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**6th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][5]} th file')\naudio1, sr1 = audio_read(filenames[index[0][5]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'আমি বলার পর একটি নয়েজ আছে এবং থাকি কথাটি ভুল উচ্চারিত')\nIPython.display.Audio(filenames[index[0][5]], autoplay=False)\n\n#আমি রাজশাহী থাকি","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:36:33.145517Z","iopub.execute_input":"2022-07-29T04:36:33.146464Z","iopub.status.idle":"2022-07-29T04:36:34.121917Z","shell.execute_reply.started":"2022-07-29T04:36:33.146427Z","shell.execute_reply":"2022-07-29T04:36:34.120923Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**7th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][6]} th file')\naudio1, sr1 = audio_read(filenames[index[0][6]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'প্রযুক্ত এর স্থানে প্রযুক্তি বলেছে, এছাড়া কোন নয়েজ নেই')\nIPython.display.Audio(filenames[index[0][6]], autoplay=False)\n\n#সম্পাদিত কাজ অতিক্রান্ত দূরত্ব ও প্রযুক্ত বলের গুণফলের সমান।\n","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:39:13.803584Z","iopub.execute_input":"2022-07-29T04:39:13.803988Z","iopub.status.idle":"2022-07-29T04:39:14.977915Z","shell.execute_reply.started":"2022-07-29T04:39:13.803942Z","shell.execute_reply":"2022-07-29T04:39:14.976795Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**8th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][7]} th file')\naudio1, sr1 = audio_read(filenames[index[0][7]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'প্রথমে একটি নয়েজ আছে এবং সাইরেননেছা বলা হয়েছে ')\nIPython.display.Audio(filenames[index[0][7]], autoplay=False)\n\n#তাঁর বাবার নাম সোনা মিয়া, মা সাইরননেছা।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:43:47.784577Z","iopub.execute_input":"2022-07-29T04:43:47.785210Z","iopub.status.idle":"2022-07-29T04:43:48.913091Z","shell.execute_reply.started":"2022-07-29T04:43:47.785173Z","shell.execute_reply":"2022-07-29T04:43:48.912115Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**9th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][8]} th file')\naudio1, sr1 = audio_read(filenames[index[0][8]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'কথা বার বার ভেঙে গেছে')\nIPython.display.Audio(filenames[index[0][8]], autoplay=False)\n#তিনি পূর্ব পাকিস্তান প্রাদেশিক পরিষদের নির্বাচিত সদস্য ছিলেন।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:20:13.116282Z","iopub.execute_input":"2022-07-29T04:20:13.116960Z","iopub.status.idle":"2022-07-29T04:20:14.167837Z","shell.execute_reply.started":"2022-07-29T04:20:13.116927Z","shell.execute_reply":"2022-07-29T04:20:14.166883Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**10th**","metadata":{}},{"cell_type":"code","source":"print(f'{index[0][9]} th file')\naudio1, sr1 = audio_read(filenames[index[0][9]])\nprint(audio1,sr1)\n\nplt.plot(audio1)\nprint(f'খুবই অস্পষ্ট কথা, একদমই শোনা যায় না বললেই চলে ')\nIPython.display.Audio(filenames[index[0][9]], autoplay=False)\n\n#তিনি হবিগঞ্জ জেলা পরিষদের সাবেক চেয়ারম্যান।","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:18:20.914691Z","iopub.execute_input":"2022-07-29T04:18:20.915081Z","iopub.status.idle":"2022-07-29T04:18:21.911120Z","shell.execute_reply.started":"2022-07-29T04:18:20.915048Z","shell.execute_reply":"2022-07-29T04:18:21.910107Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Part 2**","metadata":{}},{"cell_type":"markdown","source":"# **Creating a function to create a spectogram of an audio**","metadata":{}},{"cell_type":"code","source":"from IPython.display import Audio as ipd","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:11:56.142043Z","iopub.execute_input":"2022-07-29T04:11:56.142455Z","iopub.status.idle":"2022-07-29T04:11:56.147960Z","shell.execute_reply.started":"2022-07-29T04:11:56.142425Z","shell.execute_reply":"2022-07-29T04:11:56.146925Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def create_spect(audio_path,audio_label,i):\n    audio , sr = audio_read(audio_path) #converting the mp3 to nparray\n    X = librosa.stft(audio)             # short time fourier transform of the audio array\n    Xdb = librosa.amplitude_to_db(np.abs(X)) # decibel e neya\n    plt.figure(figsize=(12, 3)) \n    print(f'{i}th audio : {audio_label}')\n    \n    plt.title('Spectrogram for audio {} th audio'.format(i), size=15)\n    librosa.display.specshow(Xdb, sr=sr, x_axis='time', y_axis='hz')  # plotting the spectrogram\n    plt.colorbar()\n","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:11:58.381509Z","iopub.execute_input":"2022-07-29T04:11:58.381848Z","iopub.status.idle":"2022-07-29T04:11:58.389031Z","shell.execute_reply.started":"2022-07-29T04:11:58.381821Z","shell.execute_reply":"2022-07-29T04:11:58.388043Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df= pd.read_csv('../input/dlsprint/train.csv')\ntrain_df.head(3)\ndroplist = ['client_id','up_votes','down_votes','age','gender','accents','locale']\ntrain_df.drop(droplist,axis=1)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:12:03.939997Z","iopub.execute_input":"2022-07-29T04:12:03.940659Z","iopub.status.idle":"2022-07-29T04:12:04.969173Z","shell.execute_reply.started":"2022-07-29T04:12:03.940624Z","shell.execute_reply":"2022-07-29T04:12:04.968084Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Creating a lsit of of all the paths of the train csv","metadata":{}},{"cell_type":"code","source":"path_list = list(train_df['path'])","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:12:08.471536Z","iopub.execute_input":"2022-07-29T04:12:08.473463Z","iopub.status.idle":"2022-07-29T04:12:08.500128Z","shell.execute_reply.started":"2022-07-29T04:12:08.473407Z","shell.execute_reply":"2022-07-29T04:12:08.499187Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# name = filenames[0]\n# mp3_filename = name.split('/')[4]\n# print(mp3_filename)","metadata":{"execution":{"iopub.status.busy":"2022-07-26T07:36:56.588902Z","iopub.execute_input":"2022-07-26T07:36:56.589634Z","iopub.status.idle":"2022-07-26T07:36:56.608194Z","shell.execute_reply.started":"2022-07-26T07:36:56.589584Z","shell.execute_reply":"2022-07-26T07:36:56.606955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# ****This fucntion takes the filename of the audio and returns the corresponding label****","metadata":{}},{"cell_type":"code","source":"def label(filename):\n    \n    name = filename\n    mp3_filename = name.split('/')[4]\n    #print(mp3_filename)\n    for idx, x in enumerate(path_list):\n        if x==mp3_filename:\n            #index =idx\n            return train_df['sentence'][idx]\n    ","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:12:13.328614Z","iopub.execute_input":"2022-07-29T04:12:13.328957Z","iopub.status.idle":"2022-07-29T04:12:13.334773Z","shell.execute_reply.started":"2022-07-29T04:12:13.328928Z","shell.execute_reply":"2022-07-29T04:12:13.333740Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# x = '../input/dlsprint/train_files/common_voice_bn_30614352.mp3'\n\n# print(label(x))\n# IPython.display.Audio(x, autoplay=False)\n","metadata":{"execution":{"iopub.status.busy":"2022-07-26T08:13:24.735282Z","iopub.execute_input":"2022-07-26T08:13:24.735811Z","iopub.status.idle":"2022-07-26T08:13:24.789249Z","shell.execute_reply.started":"2022-07-26T08:13:24.735764Z","shell.execute_reply":"2022-07-26T08:13:24.788378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from tqdm import tqdm","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:12:17.372981Z","iopub.execute_input":"2022-07-29T04:12:17.373844Z","iopub.status.idle":"2022-07-29T04:12:17.378501Z","shell.execute_reply.started":"2022-07-29T04:12:17.373807Z","shell.execute_reply":"2022-07-29T04:12:17.377422Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{}},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[45674]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)\n\n# spectogram = []\n# idx = 39\n# #for idx in range(7000):\n# emotion=labels[idx]\n# path = filenames[idx]\n# data, sampling_rate = librosa.load(path)\n\n# a = create_spectrogram(data, sampling_rate, emotion)\n#     #Audio(path)\n# spectogram.append(a)\n","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:21:06.310306Z","iopub.execute_input":"2022-07-29T04:21:06.311296Z","iopub.status.idle":"2022-07-29T04:21:08.991082Z","shell.execute_reply.started":"2022-07-29T04:21:06.311243Z","shell.execute_reply":"2022-07-29T04:21:08.989296Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[101247]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:22:56.071820Z","iopub.execute_input":"2022-07-29T04:22:56.072204Z","iopub.status.idle":"2022-07-29T04:22:58.143129Z","shell.execute_reply.started":"2022-07-29T04:22:56.072165Z","shell.execute_reply":"2022-07-29T04:22:58.142163Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[70522]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:26:11.620041Z","iopub.execute_input":"2022-07-29T04:26:11.620772Z","iopub.status.idle":"2022-07-29T04:26:13.678176Z","shell.execute_reply.started":"2022-07-29T04:26:11.620733Z","shell.execute_reply":"2022-07-29T04:26:13.677133Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[47339]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:29:01.420008Z","iopub.execute_input":"2022-07-29T04:29:01.420377Z","iopub.status.idle":"2022-07-29T04:29:03.418060Z","shell.execute_reply.started":"2022-07-29T04:29:01.420345Z","shell.execute_reply":"2022-07-29T04:29:03.417085Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[7526]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:31:07.262953Z","iopub.execute_input":"2022-07-29T04:31:07.263326Z","iopub.status.idle":"2022-07-29T04:31:09.186382Z","shell.execute_reply.started":"2022-07-29T04:31:07.263296Z","shell.execute_reply":"2022-07-29T04:31:09.185373Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[124206]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:34:31.500113Z","iopub.execute_input":"2022-07-29T04:34:31.500878Z","iopub.status.idle":"2022-07-29T04:34:33.365185Z","shell.execute_reply.started":"2022-07-29T04:34:31.500840Z","shell.execute_reply":"2022-07-29T04:34:33.364188Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[109442]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:37:15.743796Z","iopub.execute_input":"2022-07-29T04:37:15.744217Z","iopub.status.idle":"2022-07-29T04:37:18.049821Z","shell.execute_reply.started":"2022-07-29T04:37:15.744167Z","shell.execute_reply":"2022-07-29T04:37:18.048708Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[104084]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:39:55.939241Z","iopub.execute_input":"2022-07-29T04:39:55.940247Z","iopub.status.idle":"2022-07-29T04:39:58.067852Z","shell.execute_reply.started":"2022-07-29T04:39:55.940206Z","shell.execute_reply":"2022-07-29T04:39:58.066903Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[62037]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:44:30.690095Z","iopub.execute_input":"2022-07-29T04:44:30.690564Z","iopub.status.idle":"2022-07-29T04:44:32.951174Z","shell.execute_reply.started":"2022-07-29T04:44:30.690524Z","shell.execute_reply":"2022-07-29T04:44:32.950137Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\n# for index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\nfile= filenames[173402]    \nspectogram = []\ntemp_label = label(file)\naudio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\na = create_spect(file,temp_label,index)\nspectrogram.append(a)\nIPython.display.Audio(file, autoplay=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-29T04:44:59.637504Z","iopub.execute_input":"2022-07-29T04:44:59.638097Z","iopub.status.idle":"2022-07-29T04:45:02.189559Z","shell.execute_reply.started":"2022-07-29T04:44:59.638063Z","shell.execute_reply":"2022-07-29T04:45:02.187393Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spectrogram = []\nfor index, file in enumerate ((filenames[0:100])):\n    \n    #print(f\"{index+1}th audio wave form and spectrogram\")\n    #IPython.display.Audio(file, autoplay=False)\n    spectogram = []\n    temp_label = label(file)\n    audio1, sr1 = audio_read(file)\n    #plt.plot(audio1)\n    a = create_spect(file,temp_label,index+1)\n    spectrogram.append(a)\n    IPython.display.Audio(file, autoplay=False)","metadata":{},"execution_count":null,"outputs":[]}]}