{"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":"markdown","source":"## This notebook downloads two public wav2vec2 models from huggingface.","metadata":{}},{"cell_type":"markdown","source":"### download `ai4bharat/indicwav2vec_v1_bengali` for CTC Model only ","metadata":{}},{"cell_type":"code","source":"!git clone https://huggingface.co/ai4bharat/indicwav2vec_v1_bengali","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:12:59.692985Z","iopub.execute_input":"2023-10-01T09:12:59.693456Z","iopub.status.idle":"2023-10-01T09:13:00.811600Z","shell.execute_reply.started":"2023-10-01T09:12:59.693420Z","shell.execute_reply":"2023-10-01T09:13:00.810103Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### download `arijitx/wav2vec2-xls-r-300m-bengali` for Language Model","metadata":{}},{"cell_type":"code","source":"!git clone https://huggingface.co/arijitx/wav2vec2-xls-r-300m-bengali","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:00.814003Z","iopub.execute_input":"2023-10-01T09:13:00.814389Z","iopub.status.idle":"2023-10-01T09:13:01.933159Z","shell.execute_reply.started":"2023-10-01T09:13:00.814353Z","shell.execute_reply":"2023-10-01T09:13:01.931965Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install --upgrade pip","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:01.935098Z","iopub.execute_input":"2023-10-01T09:13:01.935779Z","iopub.status.idle":"2023-10-01T09:13:12.366743Z","shell.execute_reply.started":"2023-10-01T09:13:01.935740Z","shell.execute_reply":"2023-10-01T09:13:12.365302Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rm -r python-packages2 jiwer normalizer pyctcdecode pypikenlm","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:12.369982Z","iopub.execute_input":"2023-10-01T09:13:12.370326Z","iopub.status.idle":"2023-10-01T09:13:13.503330Z","shell.execute_reply.started":"2023-10-01T09:13:12.370295Z","shell.execute_reply":"2023-10-01T09:13:13.501894Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install https://github.com/kpu/kenlm/archive/master.zip","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:13.505505Z","iopub.execute_input":"2023-10-01T09:13:13.506316Z","iopub.status.idle":"2023-10-01T09:13:37.625222Z","shell.execute_reply.started":"2023-10-01T09:13:13.506277Z","shell.execute_reply":"2023-10-01T09:13:37.623836Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install bnunicodenormalizer","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:37.626921Z","iopub.execute_input":"2023-10-01T09:13:37.627247Z","iopub.status.idle":"2023-10-01T09:13:47.699751Z","shell.execute_reply.started":"2023-10-01T09:13:37.627219Z","shell.execute_reply":"2023-10-01T09:13:47.698629Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install kenlm","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:47.701393Z","iopub.execute_input":"2023-10-01T09:13:47.701786Z","iopub.status.idle":"2023-10-01T09:13:57.714617Z","shell.execute_reply.started":"2023-10-01T09:13:47.701750Z","shell.execute_reply":"2023-10-01T09:13:57.712974Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install https://github.com/kpu/kenlm/archive/master.zip","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:13:57.716682Z","iopub.execute_input":"2023-10-01T09:13:57.717042Z","iopub.status.idle":"2023-10-01T09:14:21.406584Z","shell.execute_reply.started":"2023-10-01T09:13:57.717011Z","shell.execute_reply":"2023-10-01T09:14:21.404816Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install torch==<version>","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:14:21.408152Z","iopub.execute_input":"2023-10-01T09:14:21.408533Z","iopub.status.idle":"2023-10-01T09:14:22.528239Z","shell.execute_reply.started":"2023-10-01T09:14:21.408500Z","shell.execute_reply":"2023-10-01T09:14:22.526406Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install transformers==<version>","metadata":{"execution":{"iopub.status.busy":"2023-10-01T09:14:22.531154Z","iopub.execute_input":"2023-10-01T09:14:22.531648Z","iopub.status.idle":"2023-10-01T09:14:23.669639Z","shell.execute_reply.started":"2023-10-01T09:14:22.531608Z","shell.execute_reply":"2023-10-01T09:14:23.668575Z"},"trusted":true},"execution_count":null,"outputs":[]}]}