diff --git a/wisper_s4y_usage.ipynb b/wisper_s4y_usage.ipynb new file mode 100644 index 0000000..7e18d54 --- /dev/null +++ b/wisper_s4y_usage.ipynb @@ -0,0 +1,471 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "authorship_tag": "ABX9TyPtVvYNACCVSVhMqI9YB7V7", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "collapsed": true, + "id": "glNAiOdB4YfL", + "outputId": "49c91dca-d524-4811-d9a3-fb895147abc4" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Collecting git+https://github.com/s4ysolutions/whisper-s4y\n", + " Cloning https://github.com/s4ysolutions/whisper-s4y to /tmp/pip-req-build-re8rvqmk\n", + " Running command git clone --filter=blob:none --quiet https://github.com/s4ysolutions/whisper-s4y /tmp/pip-req-build-re8rvqmk\n", + " Resolved https://github.com/s4ysolutions/whisper-s4y to commit 257b1cd3d903cfb6cb6c55a482aac30ef79b15ee\n", + " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting argparse (from whisper-s4y==3.0.0a2)\n", + " Downloading argparse-1.4.0-py2.py3-none-any.whl.metadata (2.8 kB)\n", + "Collecting colored (from whisper-s4y==3.0.0a2)\n", + " Downloading colored-2.2.4-py3-none-any.whl.metadata (3.6 kB)\n", + "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (3.7.1)\n", + "Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (4.42.4)\n", + "Collecting openai-whisper (from whisper-s4y==3.0.0a2)\n", + " Downloading openai-whisper-20231117.tar.gz (798 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m798.6/798.6 kB\u001b[0m \u001b[31m12.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting onnx (from whisper-s4y==3.0.0a2)\n", + " Downloading onnx-1.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (16 kB)\n", + "Collecting onnx-tf (from whisper-s4y==3.0.0a2)\n", + " Downloading onnx_tf-1.10.0-py3-none-any.whl.metadata (510 bytes)\n", + "Collecting onnx-graphsurgeon (from whisper-s4y==3.0.0a2)\n", + " Downloading onnx_graphsurgeon-0.5.2-py2.py3-none-any.whl.metadata (8.1 kB)\n", + "Collecting onnx2keras (from whisper-s4y==3.0.0a2)\n", + " Downloading onnx2keras-0.0.24.tar.gz (20 kB)\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting onnxruntime (from whisper-s4y==3.0.0a2)\n", + " Downloading onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (4.3 kB)\n", + "Collecting onnxscript (from whisper-s4y==3.0.0a2)\n", + " Downloading onnxscript-0.1.0.dev20240827-py3-none-any.whl.metadata (14 kB)\n", + "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (5.9.5)\n", + "Requirement already satisfied: pytest in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (7.4.4)\n", + "Collecting sng4onnx (from whisper-s4y==3.0.0a2)\n", + " Downloading sng4onnx-1.0.4-py3-none-any.whl.metadata (4.6 kB)\n", + "Collecting tensorflow==2.16.1 (from whisper-s4y==3.0.0a2)\n", + " Downloading tensorflow-2.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.3 kB)\n", + "Collecting tensorflow-io (from whisper-s4y==3.0.0a2)\n", + " Downloading tensorflow_io-0.37.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (14 kB)\n", + "Requirement already satisfied: tensorflow-probability in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (0.24.0)\n", + "Requirement already satisfied: tf-keras in /usr/local/lib/python3.10/dist-packages (from whisper-s4y==3.0.0a2) (2.17.0)\n", + "Requirement already satisfied: absl-py>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.4.0)\n", + "Requirement already satisfied: astunparse>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.6.3)\n", + "Requirement already satisfied: flatbuffers>=23.5.26 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (24.3.25)\n", + "Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.6.0)\n", + "Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.2.0)\n", + "Requirement already satisfied: h5py>=3.10.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.11.0)\n", + "Requirement already satisfied: libclang>=13.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (18.1.1)\n", + "Collecting ml-dtypes~=0.3.1 (from tensorflow==2.16.1->whisper-s4y==3.0.0a2)\n", + " Downloading ml_dtypes-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)\n", + "Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.3.0)\n", + "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (24.1)\n", + "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.20.3)\n", + "Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2.32.3)\n", + "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (71.0.4)\n", + "Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.16.0)\n", + "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2.4.0)\n", + "Requirement already satisfied: typing-extensions>=3.6.6 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (4.12.2)\n", + "Requirement already satisfied: wrapt>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.16.0)\n", + "Requirement already satisfied: grpcio<2.0,>=1.24.3 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.64.1)\n", + "Collecting tensorboard<2.17,>=2.16 (from tensorflow==2.16.1->whisper-s4y==3.0.0a2)\n", + " Downloading tensorboard-2.16.2-py3-none-any.whl.metadata (1.6 kB)\n", + "Requirement already satisfied: keras>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.4.1)\n", + "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.37.1)\n", + "Requirement already satisfied: numpy<2.0.0,>=1.23.5 in /usr/local/lib/python3.10/dist-packages (from tensorflow==2.16.1->whisper-s4y==3.0.0a2) (1.26.4)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (1.2.1)\n", + "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (0.12.1)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (4.53.1)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (1.4.5)\n", + "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (9.4.0)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (3.1.2)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib->whisper-s4y==3.0.0a2) (2.8.2)\n", + "Requirement already satisfied: PyYAML in /usr/local/lib/python3.10/dist-packages (from onnx-tf->whisper-s4y==3.0.0a2) (6.0.2)\n", + "Collecting tensorflow-addons (from onnx-tf->whisper-s4y==3.0.0a2)\n", + " Downloading tensorflow_addons-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.8 kB)\n", + "Collecting coloredlogs (from onnxruntime->whisper-s4y==3.0.0a2)\n", + " Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)\n", + "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from onnxruntime->whisper-s4y==3.0.0a2) (1.13.2)\n", + "Collecting triton<3,>=2.0.0 (from openai-whisper->whisper-s4y==3.0.0a2)\n", + " Downloading triton-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.4 kB)\n", + "Requirement already satisfied: numba in /usr/local/lib/python3.10/dist-packages (from openai-whisper->whisper-s4y==3.0.0a2) (0.60.0)\n", + "Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from openai-whisper->whisper-s4y==3.0.0a2) (2.4.0+cu121)\n", + "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from openai-whisper->whisper-s4y==3.0.0a2) (4.66.5)\n", + "Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from openai-whisper->whisper-s4y==3.0.0a2) (10.3.0)\n", + "Collecting tiktoken (from openai-whisper->whisper-s4y==3.0.0a2)\n", + " Downloading tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)\n", + "Requirement already satisfied: iniconfig in /usr/local/lib/python3.10/dist-packages (from pytest->whisper-s4y==3.0.0a2) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from pytest->whisper-s4y==3.0.0a2) (1.5.0)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /usr/local/lib/python3.10/dist-packages (from pytest->whisper-s4y==3.0.0a2) (1.2.2)\n", + "Requirement already satisfied: tomli>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from pytest->whisper-s4y==3.0.0a2) (2.0.1)\n", + "Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from tensorflow-probability->whisper-s4y==3.0.0a2) (4.4.2)\n", + "Requirement already satisfied: cloudpickle>=1.3 in /usr/local/lib/python3.10/dist-packages (from tensorflow-probability->whisper-s4y==3.0.0a2) (2.2.1)\n", + "Requirement already satisfied: dm-tree in /usr/local/lib/python3.10/dist-packages (from tensorflow-probability->whisper-s4y==3.0.0a2) (0.1.8)\n", + "INFO: pip is looking at multiple versions of tf-keras to determine which version is compatible with other requirements. This could take a while.\n", + "Collecting tf-keras (from whisper-s4y==3.0.0a2)\n", + " Downloading tf_keras-2.16.0-py3-none-any.whl.metadata (1.6 kB)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers->whisper-s4y==3.0.0a2) (3.15.4)\n", + "Requirement already satisfied: huggingface-hub<1.0,>=0.23.2 in /usr/local/lib/python3.10/dist-packages (from transformers->whisper-s4y==3.0.0a2) (0.23.5)\n", + "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers->whisper-s4y==3.0.0a2) (2024.5.15)\n", + "Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers->whisper-s4y==3.0.0a2) (0.4.4)\n", + "Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers->whisper-s4y==3.0.0a2) (0.19.1)\n", + "Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from astunparse>=1.6.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.44.0)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.23.2->transformers->whisper-s4y==3.0.0a2) (2024.6.1)\n", + "Requirement already satisfied: rich in /usr/local/lib/python3.10/dist-packages (from keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (13.7.1)\n", + "Requirement already satisfied: namex in /usr/local/lib/python3.10/dist-packages (from keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.0.8)\n", + "Requirement already satisfied: optree in /usr/local/lib/python3.10/dist-packages (from keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.12.1)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests<3,>=2.21.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests<3,>=2.21.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.7)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests<3,>=2.21.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2.0.7)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests<3,>=2.21.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2024.7.4)\n", + "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.17,>=2.16->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.7)\n", + "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.17,>=2.16->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.7.2)\n", + "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.17,>=2.16->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.0.4)\n", + "Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime->whisper-s4y==3.0.0a2)\n", + " Downloading humanfriendly-10.0-py2.py3-none-any.whl.metadata (9.2 kB)\n", + "Requirement already satisfied: llvmlite<0.44,>=0.43.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba->openai-whisper->whisper-s4y==3.0.0a2) (0.43.0)\n", + "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->onnxruntime->whisper-s4y==3.0.0a2) (1.3.0)\n", + "Collecting typeguard<3.0.0,>=2.7 (from tensorflow-addons->onnx-tf->whisper-s4y==3.0.0a2)\n", + " Downloading typeguard-2.13.3-py3-none-any.whl.metadata (3.6 kB)\n", + "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper->whisper-s4y==3.0.0a2) (3.3)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->openai-whisper->whisper-s4y==3.0.0a2) (3.1.4)\n", + "Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.10/dist-packages (from werkzeug>=1.0.1->tensorboard<2.17,>=2.16->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2.1.5)\n", + "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich->keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (3.0.0)\n", + "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich->keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (2.16.1)\n", + "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich->keras>=3.0.0->tensorflow==2.16.1->whisper-s4y==3.0.0a2) (0.1.2)\n", + "Downloading tensorflow-2.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (589.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m589.8/589.8 MB\u001b[0m \u001b[31m927.4 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading argparse-1.4.0-py2.py3-none-any.whl (23 kB)\n", + "Downloading colored-2.2.4-py3-none-any.whl (16 kB)\n", + "Downloading onnx-1.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.9/15.9 MB\u001b[0m \u001b[31m19.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading onnx_graphsurgeon-0.5.2-py2.py3-none-any.whl (56 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.4/56.4 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading onnx_tf-1.10.0-py3-none-any.whl (226 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m226.1/226.1 kB\u001b[0m \u001b[31m13.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (13.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.2/13.2 MB\u001b[0m \u001b[31m35.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading onnxscript-0.1.0.dev20240827-py3-none-any.whl (663 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m663.4/663.4 kB\u001b[0m \u001b[31m19.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading sng4onnx-1.0.4-py3-none-any.whl (5.9 kB)\n", + "Downloading tensorflow_io-0.37.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.6/49.6 MB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tf_keras-2.16.0-py3-none-any.whl (1.7 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m16.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading ml_dtypes-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.2/2.2 MB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tensorboard-2.16.2-py3-none-any.whl (5.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.5/5.5 MB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading triton-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (168.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m168.1/168.1 MB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tensorflow_addons-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (611 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m611.8/611.8 kB\u001b[0m \u001b[31m23.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m34.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading typeguard-2.13.3-py3-none-any.whl (17 kB)\n", + "Building wheels for collected packages: whisper-s4y, onnx2keras, openai-whisper\n", + " Building wheel for whisper-s4y (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for whisper-s4y: filename=whisper_s4y-3.0.0a2-py3-none-any.whl size=24172 sha256=e382349553efa46093342c7667adb532ea74ac4e25cf600aeebc58d6dd03724a\n", + " Stored in directory: /tmp/pip-ephem-wheel-cache-3yqy2ayl/wheels/1f/84/27/969be290b28b02bdb008981fcb3d40eb9eb22a9024ca0add36\n", + " Building wheel for onnx2keras (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for onnx2keras: filename=onnx2keras-0.0.24-py3-none-any.whl size=24577 sha256=f6d295ec25312c00f6280c9c4a7c54905e05294030c68e98e9e2f989a8e4ac95\n", + " Stored in directory: /root/.cache/pip/wheels/a1/fb/c9/349c27912022d104c7dd5f5d272595c33b1b959c4468d5e784\n", + " Building wheel for openai-whisper (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for openai-whisper: filename=openai_whisper-20231117-py3-none-any.whl size=801360 sha256=59bb2f9240ad967088944cd56327512ae683171d3a29a8de6aa58dc9408859e9\n", + " Stored in directory: /root/.cache/pip/wheels/d0/85/e1/9361b4cbea7dd4b7f6702fa4c3afc94877952eeb2b62f45f56\n", + "Successfully built whisper-s4y onnx2keras openai-whisper\n", + "Installing collected packages: argparse, typeguard, triton, tensorflow-io, sng4onnx, onnx, ml-dtypes, humanfriendly, colored, tiktoken, tensorflow-addons, tensorboard, onnxscript, onnx-graphsurgeon, coloredlogs, openai-whisper, onnxruntime, onnx-tf, tensorflow, tf-keras, onnx2keras, whisper-s4y\n", + " Attempting uninstall: typeguard\n", + " Found existing installation: typeguard 4.3.0\n", + " Uninstalling typeguard-4.3.0:\n", + " Successfully uninstalled typeguard-4.3.0\n", + " Attempting uninstall: ml-dtypes\n", + " Found existing installation: ml-dtypes 0.4.0\n", + " Uninstalling ml-dtypes-0.4.0:\n", + " Successfully uninstalled ml-dtypes-0.4.0\n", + " Attempting uninstall: tensorboard\n", + " Found existing installation: tensorboard 2.17.0\n", + " Uninstalling tensorboard-2.17.0:\n", + " Successfully uninstalled tensorboard-2.17.0\n", + " Attempting uninstall: tensorflow\n", + " Found existing installation: tensorflow 2.17.0\n", + " Uninstalling tensorflow-2.17.0:\n", + " Successfully uninstalled tensorflow-2.17.0\n", + " Attempting uninstall: tf-keras\n", + " Found existing installation: tf_keras 2.17.0\n", + " Uninstalling tf_keras-2.17.0:\n", + " Successfully uninstalled tf_keras-2.17.0\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "inflect 7.3.1 requires typeguard>=4.0.1, but you have typeguard 2.13.3 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed argparse-1.4.0 colored-2.2.4 coloredlogs-15.0.1 humanfriendly-10.0 ml-dtypes-0.3.2 onnx-1.16.2 onnx-graphsurgeon-0.5.2 onnx-tf-1.10.0 onnx2keras-0.0.24 onnxruntime-1.19.0 onnxscript-0.1.0.dev20240827 openai-whisper-20231117 sng4onnx-1.0.4 tensorboard-2.16.2 tensorflow-2.16.1 tensorflow-addons-0.23.0 tensorflow-io-0.37.1 tf-keras-2.16.0 tiktoken-0.7.0 triton-2.3.1 typeguard-2.13.3 whisper-s4y-3.0.0a2\n" + ] + }, + { + "output_type": "display_data", + "data": { + "application/vnd.colab-display-data+json": { + "pip_warning": { + "packages": [ + "argparse" + ] + }, + "id": "fa6c2bac4a5b4fcfb62f24fb594d8409" + } + }, + "metadata": {} + } + ], + "source": [ + "!pip install git+https://github.com/s4ysolutions/whisper-s4y" + ] + }, + { + "cell_type": "markdown", + "source": [ + "Create feature extractor" + ], + "metadata": { + "id": "EM45yEcF6yhV" + } + }, + { + "cell_type": "code", + "source": [ + "from google.colab import files\n", + "from whisper_s4y.features_extractor import S4yFeaturesExtractor\n", + "\n", + "tflite_model_path = S4yFeaturesExtractor().tflite(optimize=False)\n", + "\n", + "files.download(tflite_model_path)\n", + "\n" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 289 + }, + "id": "18DoNXfXCWUh", + "outputId": "ba1a8685-d4d5-45ca-beaf-93541523388a" + }, + "execution_count": 4, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:15:59,600 DEBUG features-extractor save start...\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "DEBUG:whisper_s4y:features-extractor save start...\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,083 INFO features-extractor save done in /tmp/whisper2tflite/features-extractor\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor save done in /tmp/whisper2tflite/features-extractor\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,088 INFO features-extractor.tflite create converter start...\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor.tflite create converter start...\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,155 INFO features-extractor.tflite create converter done\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor.tflite create converter done\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,159 INFO features-extractor.tflite converting start...\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor.tflite converting start...\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,331 INFO features-extractor.tflite converting done\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor.tflite converting done\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,336 DEBUG features-extractor.tflite converted model save start...\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "DEBUG:whisper_s4y:features-extractor.tflite converted model save start...\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "whisper_s4y 2024-08-27 18:16:00,341 INFO features-extractor.tflite converted model save done: /tmp/whisper2tflite/features-extractor/features-extractor.tflite\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "INFO:whisper_s4y:features-extractor.tflite converted model save done: /tmp/whisper2tflite/features-extractor/features-extractor.tflite\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "application/javascript": [ + "\n", + " async function download(id, filename, size) {\n", + " if (!google.colab.kernel.accessAllowed) {\n", + " return;\n", + " }\n", + " const div = document.createElement('div');\n", + " const label = document.createElement('label');\n", + " label.textContent = `Downloading \"${filename}\": `;\n", + " div.appendChild(label);\n", + " const progress = document.createElement('progress');\n", + " progress.max = size;\n", + " div.appendChild(progress);\n", + " document.body.appendChild(div);\n", + "\n", + " const buffers = [];\n", + " let downloaded = 0;\n", + "\n", + " const channel = await google.colab.kernel.comms.open(id);\n", + " // Send a message to notify the kernel that we're ready.\n", + " channel.send({})\n", + "\n", + " for await (const message of channel.messages) {\n", + " // Send a message to notify the kernel that we're ready.\n", + " channel.send({})\n", + " if (message.buffers) {\n", + " for (const buffer of message.buffers) {\n", + " buffers.push(buffer);\n", + " downloaded += buffer.byteLength;\n", + " progress.value = downloaded;\n", + " }\n", + " }\n", + " }\n", + " const blob = new Blob(buffers, {type: 'application/binary'});\n", + " const a = document.createElement('a');\n", + " a.href = window.URL.createObjectURL(blob);\n", + " a.download = filename;\n", + " div.appendChild(a);\n", + " a.click();\n", + " div.remove();\n", + " }\n", + " " + ] + }, + "metadata": {} + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "" + ], + "application/javascript": [ + "download(\"download_bbdad077-cbc6-4424-8d4a-f02657f5e443\", \"features-extractor.tflite\", 149168)" + ] + }, + "metadata": {} + } + ] + } + ] +} \ No newline at end of file