diff --git "a/data_testing.ipynb" "b/data_testing.ipynb" new file mode 100644--- /dev/null +++ "b/data_testing.ipynb" @@ -0,0 +1,75 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "aa8d8cf7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "region North\n", + "province_code 11\n", + "province_name CaoBang\n", + "filename 11_0004.wav\n", + "text Ý tưởng đầu tiên tôi phải nhắc đến là vấn đề v...\n", + "speakerID spk_11_0002\n", + "gender 1\n", + "audio {'bytes': b'RIFF\\x80\\x93<\\x00WAVEfmt \\x10\\x00\\...\n", + "Name: 3, dtype: object\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "import IPython.display as ipd\n", + "df = pd.read_parquet(r\"D:\\SPL\\Code\\PhanBietVungMien\\dataset1\\whisper-small\\dataset\\ViMD_Dataset\\train\\train-00000-of-00103.parquet\")\n", + "num = df.iloc[3]\n", + "audio_bytes = num['audio']['bytes']\n", + "print(num)\n", + "ipd.Audio(data=audio_bytes)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}