{"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":"<div style=\"color:white;\n           display:fill;\n           border-radius:2px;\n           background-color:Green;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n<p style=\"padding: 10px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           🗣🔈Whisper Open AI Model📊\n</p>\n<style>\n        h1{text-align: center;}\n </style>  \n    \n</div> ","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-10-20T16:58:41.024208Z","iopub.execute_input":"2022-10-20T16:58:41.024574Z","iopub.status.idle":"2022-10-20T16:58:56.564146Z","shell.execute_reply.started":"2022-10-20T16:58:41.024543Z","shell.execute_reply":"2022-10-20T16:58:56.562968Z"},"jupyter":{"outputs_hidden":true}}},{"cell_type":"markdown","source":"<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:brown;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           🙏🏽About The Whisper Model 🧾📑\n</p>\n<style>\n        h1{text-align: center;}\n </style>  ","metadata":{}},{"cell_type":"markdown","source":"# https://github.com/openai/whisper","metadata":{}},{"cell_type":"markdown","source":"<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:skyblue;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:blue;\">\n           📚📚Installing the model from repo 🧾📑\n</p>\n<style>\n        h1{text-align: center;}\n </style>  ","metadata":{}},{"cell_type":"code","source":"!pip install git+https://github.com/openai/whisper.git","metadata":{"_kg_hide-output":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:red;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           📚📚Video from Youtube Library<span style='font-size:50px;'>&#128295;</span>\n</p>\n<style>\n        h1{text-align: center;}\n </style>  \n","metadata":{}},{"cell_type":"code","source":"!pip install pytube\n","metadata":{"execution":{"iopub.status.busy":"2022-10-20T16:58:56.567827Z","iopub.execute_input":"2022-10-20T16:58:56.568173Z","iopub.status.idle":"2022-10-20T16:59:06.381184Z","shell.execute_reply.started":"2022-10-20T16:58:56.568139Z","shell.execute_reply":"2022-10-20T16:59:06.380029Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:orange;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           📚📚Reading in Youtube Data ▶\n</p>\n<style>\n        h1{text-align: center;}\n </style>  \n","metadata":{}},{"cell_type":"code","source":"import pytube\n# Reading the joker famous dialogue\nvideo = \"https://www.youtube.com/watch?v=JrfCRF50qaA\"\ndata = pytube.YouTube(video)\n# Converting and downloading as 'MP4' file\naudio = data.streams.get_audio_only()\naudio.download()","metadata":{"execution":{"iopub.status.busy":"2022-10-20T16:59:06.383221Z","iopub.execute_input":"2022-10-20T16:59:06.383579Z","iopub.status.idle":"2022-10-20T16:59:14.327805Z","shell.execute_reply.started":"2022-10-20T16:59:06.383538Z","shell.execute_reply":"2022-10-20T16:59:14.326951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"\n<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:blue;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           📚📚Importing Whisper Libraries <span style='font-size:50px;'>&#128295;</span>\n</p>\n<style>\n        h1{text-align: center;}\n </style>  \n","metadata":{}},{"cell_type":"code","source":"import whisper","metadata":{"execution":{"iopub.status.busy":"2022-10-20T16:59:14.330305Z","iopub.execute_input":"2022-10-20T16:59:14.330672Z","iopub.status.idle":"2022-10-20T16:59:16.512807Z","shell.execute_reply.started":"2022-10-20T16:59:14.330636Z","shell.execute_reply":"2022-10-20T16:59:16.511829Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model = whisper.load_model(\"medium\")","metadata":{"execution":{"iopub.status.busy":"2022-10-20T16:59:16.514382Z","iopub.execute_input":"2022-10-20T16:59:16.515026Z","iopub.status.idle":"2022-10-20T17:00:04.961110Z","shell.execute_reply.started":"2022-10-20T16:59:16.514979Z","shell.execute_reply":"2022-10-20T17:00:04.959951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"\n<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:yellow;\n           font-size:250%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:black;\">\n           👨🏽‍🏭Finally Youtube converted to text fromat using whisper model🎞📕\n</p>\n<style>\n        h1{text-align: center;}\n </style>  \n","metadata":{}},{"cell_type":"code","source":"out = model.transcribe(\"./25 great joker quotes.mp4\",language='ja')\nout","metadata":{"execution":{"iopub.status.busy":"2022-10-20T17:00:04.963349Z","iopub.execute_input":"2022-10-20T17:00:04.963730Z","iopub.status.idle":"2022-10-20T17:00:55.290997Z","shell.execute_reply.started":"2022-10-20T17:00:04.963683Z","shell.execute_reply":"2022-10-20T17:00:55.289892Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"out = model.transcribe(\"./25 great joker quotes.mp4\",language='en')\nout","metadata":{"execution":{"iopub.status.busy":"2022-10-20T17:03:15.978634Z","iopub.execute_input":"2022-10-20T17:03:15.979410Z","iopub.status.idle":"2022-10-20T17:03:57.457995Z","shell.execute_reply.started":"2022-10-20T17:03:15.979369Z","shell.execute_reply":"2022-10-20T17:03:57.456851Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<div style=\"color:white;\n           display:fill;\n           border-radius:5px;\n           background-color:purple;\n           font-size:200%;\n           font-family:Verdana;\n           letter-spacing:0.5px\">\n\n<p style=\"padding:3px;\n          text-align: center;\n          font-size:150%;\n          color:green;\">\n           🆓🆓Feel Free to Modify any chages 🔗🔗\n</p>\n<style>\n        h1{text-align: center;}\n </style>  ","metadata":{}}]}