Skip to content

Instantly share code, notes, and snippets.

@aszi09
Created August 27, 2020 23:07
Show Gist options
  • Save aszi09/96bad06114310f2cf5b517df37352e16 to your computer and use it in GitHub Desktop.
Save aszi09/96bad06114310f2cf5b517df37352e16 to your computer and use it in GitHub Desktop.
deepspeechlatest.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "deepspeechlatest.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyM7GYqbnX5ddC7+jXMH+syb",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/aszi09/96bad06114310f2cf5b517df37352e16/deepspeechlatest.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "SbdBLywfEM5E",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 138
},
"outputId": "54ffe892-c01a-4c1d-b3e7-dcdb199b875c"
},
"source": [
"!git clone https://github.com/mozilla/DeepSpeech"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"text": [
"Cloning into 'DeepSpeech'...\n",
"remote: Enumerating objects: 155, done.\u001b[K\n",
"remote: Counting objects: 100% (155/155), done.\u001b[K\n",
"remote: Compressing objects: 100% (79/79), done.\u001b[K\n",
"remote: Total 21568 (delta 88), reused 117 (delta 73), pack-reused 21413\u001b[K\n",
"Receiving objects: 100% (21568/21568), 48.44 MiB | 25.37 MiB/s, done.\n",
"Resolving deltas: 100% (14868/14868), done.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "_MlG2ovPEWr5",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 554
},
"outputId": "ab694fc4-8589-4867-b44e-32e43e1e2a31"
},
"source": [
"! apt-get install python3-venv\n"
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"text": [
"Reading package lists... Done\n",
"Building dependency tree \n",
"Reading state information... Done\n",
"The following package was automatically installed and is no longer required:\n",
" libnvidia-common-440\n",
"Use 'apt autoremove' to remove it.\n",
"The following additional packages will be installed:\n",
" python-pip-whl python3.6-venv\n",
"The following NEW packages will be installed:\n",
" python-pip-whl python3-venv python3.6-venv\n",
"0 upgraded, 3 newly installed, 0 to remove and 35 not upgraded.\n",
"Need to get 1,660 kB of archives.\n",
"After this operation, 1,902 kB of additional disk space will be used.\n",
"Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.2 [1,653 kB]\n",
"Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3.6-venv amd64 3.6.9-1~18.04ubuntu1.1 [6,184 B]\n",
"Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-venv amd64 3.6.7-1~18.04 [1,208 B]\n",
"Fetched 1,660 kB in 2s (1,093 kB/s)\n",
"Selecting previously unselected package python-pip-whl.\n",
"(Reading database ... 144556 files and directories currently installed.)\n",
"Preparing to unpack .../python-pip-whl_9.0.1-2.3~ubuntu1.18.04.2_all.deb ...\n",
"Unpacking python-pip-whl (9.0.1-2.3~ubuntu1.18.04.2) ...\n",
"Selecting previously unselected package python3.6-venv.\n",
"Preparing to unpack .../python3.6-venv_3.6.9-1~18.04ubuntu1.1_amd64.deb ...\n",
"Unpacking python3.6-venv (3.6.9-1~18.04ubuntu1.1) ...\n",
"Selecting previously unselected package python3-venv.\n",
"Preparing to unpack .../python3-venv_3.6.7-1~18.04_amd64.deb ...\n",
"Unpacking python3-venv (3.6.7-1~18.04) ...\n",
"Setting up python-pip-whl (9.0.1-2.3~ubuntu1.18.04.2) ...\n",
"Setting up python3.6-venv (3.6.9-1~18.04ubuntu1.1) ...\n",
"Setting up python3-venv (3.6.7-1~18.04) ...\n",
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "YcX3PdLcEf84",
"colab_type": "code",
"colab": {}
},
"source": [
"!python3 -m venv $HOME/tmp/deepspeech-train-venv/\n"
],
"execution_count": 5,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "TzNZGp_wElom",
"colab_type": "code",
"colab": {}
},
"source": [
"!source $HOME/tmp/deepspeech-train-venv/bin/activate"
],
"execution_count": 6,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "3HRCOkAGEqep",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "8bb74e2c-c60e-449a-810f-4c22af70e87f"
},
"source": [
"cd DeepSpeech/"
],
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"text": [
"/content/DeepSpeech\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "iVuApFK3EsFk",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 986
},
"outputId": "919d6f8d-b0f7-408f-a15e-90d98210de9a"
},
"source": [
"!pip3 install --upgrade pip==20.0.2 wheel==0.34.2 setuptools==46.1.3\n",
"!pip3 install --upgrade -e .\n"
],
"execution_count": 9,
"outputs": [
{
"output_type": "stream",
"text": [
"Collecting pip==20.0.2\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)\n",
"\u001b[K |████████████████████████████████| 1.4MB 6.5MB/s \n",
"\u001b[?25hCollecting wheel==0.34.2\n",
" Downloading https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl\n",
"Collecting setuptools==46.1.3\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582kB)\n",
"\u001b[K |████████████████████████████████| 583kB 43.5MB/s \n",
"\u001b[31mERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.\u001b[0m\n",
"\u001b[?25hInstalling collected packages: pip, wheel, setuptools\n",
" Found existing installation: pip 19.3.1\n",
" Uninstalling pip-19.3.1:\n",
" Successfully uninstalled pip-19.3.1\n",
" Found existing installation: wheel 0.35.1\n",
" Uninstalling wheel-0.35.1:\n",
" Successfully uninstalled wheel-0.35.1\n",
" Found existing installation: setuptools 49.6.0\n",
" Uninstalling setuptools-49.6.0:\n",
" Successfully uninstalled setuptools-49.6.0\n",
"Successfully installed pip-20.0.2 setuptools-46.1.3 wheel-0.34.2\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.colab-display-data+json": {
"pip_warning": {
"packages": [
"pkg_resources"
]
}
}
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Obtaining file:///content/DeepSpeech\n",
"Requirement already satisfied, skipping upgrade: numpy in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (1.18.5)\n",
"Requirement already satisfied, skipping upgrade: progressbar2 in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (3.38.0)\n",
"Requirement already satisfied, skipping upgrade: six in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (1.15.0)\n",
"Collecting pyxdg\n",
" Downloading pyxdg-0.26-py2.py3-none-any.whl (40 kB)\n",
"\u001b[K |████████████████████████████████| 40 kB 2.7 MB/s \n",
"\u001b[?25hCollecting attrdict\n",
" Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)\n",
"Requirement already satisfied, skipping upgrade: absl-py in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (0.8.1)\n",
"Collecting semver\n",
" Downloading semver-2.10.2-py2.py3-none-any.whl (12 kB)\n",
"Collecting opuslib==2.0.0\n",
" Downloading opuslib-2.0.0.tar.gz (7.3 kB)\n",
"Collecting optuna\n",
" Downloading optuna-2.0.0.tar.gz (226 kB)\n",
"\u001b[K |████████████████████████████████| 226 kB 11.5 MB/s \n",
"\u001b[?25hCollecting sox\n",
" Downloading sox-1.4.0-py2.py3-none-any.whl (39 kB)\n",
"Requirement already satisfied, skipping upgrade: bs4 in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (0.0.1)\n",
"Requirement already satisfied, skipping upgrade: pandas in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (1.0.5)\n",
"Requirement already satisfied, skipping upgrade: requests in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (2.23.0)\n",
"Collecting numba==0.47.0\n",
" Downloading numba-0.47.0-cp36-cp36m-manylinux1_x86_64.whl (3.7 MB)\n",
"\u001b[K |████████████████████████████████| 3.7 MB 44.7 MB/s \n",
"\u001b[?25hRequirement already satisfied, skipping upgrade: llvmlite==0.31.0 in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (0.31.0)\n",
"Requirement already satisfied, skipping upgrade: librosa in /usr/local/lib/python3.6/dist-packages (from deepspeech-training==0.9.0a7) (0.6.3)\n",
"Collecting soundfile\n",
" Downloading SoundFile-0.10.3.post1-py2.py3-none-any.whl (21 kB)\n",
"\u001b[31mERROR: Could not find a version that satisfies the requirement ds_ctcdecoder==0.9.0-alpha.7 (from deepspeech-training==0.9.0a7) (from versions: 0.6.1, 0.7.0, 0.7.1, 0.7.3, 0.7.4, 0.8.0a3, 0.8.0a4, 0.8.0a5, 0.8.0a6, 0.8.0a7, 0.8.0a8, 0.8.0, 0.8.1, 0.8.2, 0.9.0a0, 0.9.0a1, 0.9.0a2, 0.9.0a3, 0.9.0a4, 0.9.0a5)\u001b[0m\n",
"\u001b[31mERROR: No matching distribution found for ds_ctcdecoder==0.9.0-alpha.7 (from deepspeech-training==0.9.0a7)\u001b[0m\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "J-wgakt9EwWJ",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 156
},
"outputId": "50381688-9897-47b8-8cb2-d502be59a65a"
},
"source": [
"!sudo apt-get install python3-dev\n"
],
"execution_count": 10,
"outputs": [
{
"output_type": "stream",
"text": [
"Reading package lists... Done\n",
"Building dependency tree \n",
"Reading state information... Done\n",
"python3-dev is already the newest version (3.6.7-1~18.04).\n",
"The following package was automatically installed and is no longer required:\n",
" libnvidia-common-440\n",
"Use 'sudo apt autoremove' to remove it.\n",
"0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "yAgeaQ9BEyq_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"outputId": "13ae2a75-23b7-4ef7-dcfb-1885d13932f8"
},
"source": [
"!pip3 install ds_ctcdecoder==0.9.0a7"
],
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[31mERROR: Could not find a version that satisfies the requirement ds_ctcdecoder==0.9.0a7 (from versions: 0.6.1, 0.7.0, 0.7.1, 0.7.3, 0.7.4, 0.8.0a3, 0.8.0a4, 0.8.0a5, 0.8.0a6, 0.8.0a7, 0.8.0a8, 0.8.0, 0.8.1, 0.8.2, 0.9.0a0, 0.9.0a1, 0.9.0a2, 0.9.0a3, 0.9.0a4, 0.9.0a5)\u001b[0m\n",
"\u001b[31mERROR: No matching distribution found for ds_ctcdecoder==0.9.0a7\u001b[0m\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ocqviO05FFdP",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 294
},
"outputId": "73958c4e-32fd-403c-ec9f-eabc9ae71c17"
},
"source": [
"!pip3 install folium==0.2.1"
],
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"text": [
"Collecting folium==0.2.1\n",
" Downloading folium-0.2.1.tar.gz (69 kB)\n",
"\u001b[?25l\r\u001b[K |████▊ | 10 kB 41.2 MB/s eta 0:00:01\r\u001b[K |█████████▍ | 20 kB 3.1 MB/s eta 0:00:01\r\u001b[K |██████████████ | 30 kB 4.2 MB/s eta 0:00:01\r\u001b[K |██████████████████▊ | 40 kB 4.5 MB/s eta 0:00:01\r\u001b[K |███████████████████████▍ | 51 kB 3.7 MB/s eta 0:00:01\r\u001b[K |████████████████████████████ | 61 kB 4.0 MB/s eta 0:00:01\r\u001b[K |████████████████████████████████| 69 kB 3.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: Jinja2 in /usr/local/lib/python3.6/dist-packages (from folium==0.2.1) (2.11.2)\n",
"Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.6/dist-packages (from Jinja2->folium==0.2.1) (1.1.1)\n",
"Building wheels for collected packages: folium\n",
" Building wheel for folium (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for folium: filename=folium-0.2.1-py3-none-any.whl size=79978 sha256=577200b4bbc449838a8c9648bf04a1db2555f0a6045213c7466d9da74835a274\n",
" Stored in directory: /root/.cache/pip/wheels/b9/9d/f7/42a080a41839b2db3c3572a0c81cc17a88a7f4ba890741c621\n",
"Successfully built folium\n",
"Installing collected packages: folium\n",
" Attempting uninstall: folium\n",
" Found existing installation: folium 0.8.3\n",
" Uninstalling folium-0.8.3:\n",
" Successfully uninstalled folium-0.8.3\n",
"Successfully installed folium-0.2.1\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZTkEXR7wFMI_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"outputId": "3f2ff765-2eac-43b9-9c1d-14d1db25ef62"
},
"source": [
"!pip3 uninstall tensorflow\n",
"!pip3 install 'tensorflow-gpu==1.15.2'\n"
],
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"text": [
"Found existing installation: tensorflow 2.3.0\n",
"Uninstalling tensorflow-2.3.0:\n",
" Would remove:\n",
" /usr/local/bin/estimator_ckpt_converter\n",
" /usr/local/bin/saved_model_cli\n",
" /usr/local/bin/tensorboard\n",
" /usr/local/bin/tf_upgrade_v2\n",
" /usr/local/bin/tflite_convert\n",
" /usr/local/bin/toco\n",
" /usr/local/bin/toco_from_protos\n",
" /usr/local/lib/python3.6/dist-packages/tensorflow-2.3.0.dist-info/*\n",
" /usr/local/lib/python3.6/dist-packages/tensorflow/*\n",
"Proceed (y/n)? y\n",
"y\n",
" Successfully uninstalled tensorflow-2.3.0\n",
"Collecting tensorflow-gpu==1.15.2\n",
" Downloading tensorflow_gpu-1.15.2-cp36-cp36m-manylinux2010_x86_64.whl (411.0 MB)\n",
"\u001b[K |████████████████████████████████| 411.0 MB 34 kB/s \n",
"\u001b[?25hCollecting tensorboard<1.16.0,>=1.15.0\n",
" Downloading tensorboard-1.15.0-py3-none-any.whl (3.8 MB)\n",
"\u001b[K |████████████████████████████████| 3.8 MB 75.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.1.2)\n",
"Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.15.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (0.2.0)\n",
"Collecting tensorflow-estimator==1.15.1\n",
" Downloading tensorflow_estimator-1.15.1-py2.py3-none-any.whl (503 kB)\n",
"\u001b[K |████████████████████████████████| 503 kB 72.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: numpy<2.0,>=1.16.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.18.5)\n",
"Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (0.8.1)\n",
"Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.1.0)\n",
"Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.31.0)\n",
"Collecting gast==0.2.2\n",
" Downloading gast-0.2.2.tar.gz (10 kB)\n",
"Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (3.12.4)\n",
"Collecting keras-applications>=1.0.8\n",
" Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB)\n",
"\u001b[K |████████████████████████████████| 50 kB 7.6 MB/s \n",
"\u001b[?25hRequirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (3.3.0)\n",
"Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (1.12.1)\n",
"Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (0.8.1)\n",
"Requirement already satisfied: wheel>=0.26; python_version >= \"3\" in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.15.2) (0.34.2)\n",
"Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu==1.15.2) (46.1.3)\n",
"Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu==1.15.2) (1.0.1)\n",
"Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu==1.15.2) (3.2.2)\n",
"Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.8->tensorflow-gpu==1.15.2) (2.10.0)\n",
"Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow-gpu==1.15.2) (1.7.0)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow-gpu==1.15.2) (3.1.0)\n",
"Building wheels for collected packages: gast\n",
" Building wheel for gast (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for gast: filename=gast-0.2.2-py3-none-any.whl size=7539 sha256=949b9e22897dbc25653a596187b6ff7c95de39d9d7838847f98518eabc0e7c40\n",
" Stored in directory: /root/.cache/pip/wheels/19/a7/b9/0740c7a3a7d1d348f04823339274b90de25fbcd217b2ee1fbe\n",
"Successfully built gast\n",
"\u001b[31mERROR: tensorflow-probability 0.11.0 has requirement gast>=0.3.2, but you'll have gast 0.2.2 which is incompatible.\u001b[0m\n",
"Installing collected packages: tensorboard, tensorflow-estimator, gast, keras-applications, tensorflow-gpu\n",
" Attempting uninstall: tensorboard\n",
" Found existing installation: tensorboard 2.3.0\n",
" Uninstalling tensorboard-2.3.0:\n",
" Successfully uninstalled tensorboard-2.3.0\n",
" Attempting uninstall: tensorflow-estimator\n",
" Found existing installation: tensorflow-estimator 2.3.0\n",
" Uninstalling tensorflow-estimator-2.3.0:\n",
" Successfully uninstalled tensorflow-estimator-2.3.0\n",
" Attempting uninstall: gast\n",
" Found existing installation: gast 0.3.3\n",
" Uninstalling gast-0.3.3:\n",
" Successfully uninstalled gast-0.3.3\n",
"Successfully installed gast-0.2.2 keras-applications-1.0.8 tensorboard-1.15.0 tensorflow-estimator-1.15.1 tensorflow-gpu-1.15.2\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "1gB1qTXfFXFG",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 156
},
"outputId": "c98d320e-9a37-4b0f-edf0-326f6a916123"
},
"source": [
"!pip3 install gast==0.2.2"
],
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"text": [
"Processing /root/.cache/pip/wheels/19/a7/b9/0740c7a3a7d1d348f04823339274b90de25fbcd217b2ee1fbe/gast-0.2.2-py3-none-any.whl\n",
"\u001b[31mERROR: tensorflow-probability 0.11.0 has requirement gast>=0.3.2, but you'll have gast 0.2.2 which is incompatible.\u001b[0m\n",
"Installing collected packages: gast\n",
" Attempting uninstall: gast\n",
" Found existing installation: gast 0.3.2\n",
" Uninstalling gast-0.3.2:\n",
" Successfully uninstalled gast-0.3.2\n",
"Successfully installed gast-0.2.2\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "Ir1RoD9xGnvu",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "599ceaea-2cf8-4ce4-9930-3559cdc8e4d9"
},
"source": [
"!make Dockerfile.train "
],
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"text": [
"make: *** No rule to make target 'Dockerfile.train'. Stop.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "BvZGqXn7IJQY",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "9129d86a-3f25-42c7-88b5-30046e21d4dd"
},
"source": [
"cd /content/"
],
"execution_count": 7,
"outputs": [
{
"output_type": "stream",
"text": [
"/content\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "5Nm4zBYvIPoP",
"colab_type": "code",
"colab": {}
},
"source": [
"mkdir es"
],
"execution_count": 8,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "1cKxcE12IQmQ",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "25f3ac16-8762-4570-cae0-1012fd66786b"
},
"source": [
"cd es"
],
"execution_count": 9,
"outputs": [
{
"output_type": "stream",
"text": [
"/content/es\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "XYtugvjeISeF",
"colab_type": "code",
"colab": {}
},
"source": [
"ls"
],
"execution_count": 10,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "KgHZ6-eaIS4D",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 208
},
"outputId": "59d93c13-769f-48f5-f84f-6b01f3260340"
},
"source": [
"!wget https://voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com/cv-corpus-5.1-2020-06-22/es.tar.gz"
],
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"text": [
"--2020-08-27 22:54:48-- https://voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com/cv-corpus-5.1-2020-06-22/es.tar.gz\n",
"Resolving voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com (voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com)... 52.218.181.67\n",
"Connecting to voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com (voice-prod-bundler-ee1969a6ce8178826482b88e843c335139bd3fb4.s3.amazonaws.com)|52.218.181.67|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 14601842052 (14G) [application/octet-stream]\n",
"Saving to: ‘es.tar.gz’\n",
"\n",
"es.tar.gz 100%[===================>] 13.60G 44.7MB/s in 5m 34s \n",
"\n",
"2020-08-27 23:00:22 (41.6 MB/s) - ‘es.tar.gz’ saved [14601842052/14601842052]\n",
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "OI8odJK8JxIa",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "28f04e5a-ab49-4aae-a66d-956860996fa5"
},
"source": [
"ls"
],
"execution_count": 13,
"outputs": [
{
"output_type": "stream",
"text": [
"es.tar.gz\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "SnsrAOJYKMuy",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"outputId": "7923e5ea-9717-47e6-efcd-ea1c3452a846"
},
"source": [
"cd /connect/DeepSpeech"
],
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"text": [
"[Errno 2] No such file or directory: '/connect/DeepSpeech'\n",
"/content/es\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "MVnbbWuxKUT2",
"colab_type": "code",
"colab": {}
},
"source": [
"!source $HOME/tmp/deepspeech-train-venv/bin/activate"
],
"execution_count": 15,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "gnAhvHphKaeF",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "c889297d-f608-4cb6-8e54-59370e6c5e88"
},
"source": [
"cd /content/DeepSpeech/"
],
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"text": [
"/content/DeepSpeech\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "6C3kNu7HKdbO",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"outputId": "94b38402-66db-4215-b054-c9f62b5efb8d"
},
"source": [
"! sudo apt-get install sox libsox-fmt-mp3"
],
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
"text": [
"Reading package lists... Done\n",
"Building dependency tree \n",
"Reading state information... Done\n",
"The following package was automatically installed and is no longer required:\n",
" libnvidia-common-440\n",
"Use 'sudo apt autoremove' to remove it.\n",
"The following additional packages will be installed:\n",
" libid3tag0 libmad0 libmagic-mgc libmagic1 libopencore-amrnb0\n",
" libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox3\n",
"Suggested packages:\n",
" file libsox-fmt-all\n",
"The following NEW packages will be installed:\n",
" libid3tag0 libmad0 libmagic-mgc libmagic1 libopencore-amrnb0\n",
" libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox-fmt-mp3 libsox3\n",
" sox\n",
"0 upgraded, 11 newly installed, 0 to remove and 35 not upgraded.\n",
"Need to get 872 kB of archives.\n",
"After this operation, 7,087 kB of additional disk space will be used.\n",
"Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libopencore-amrnb0 amd64 0.1.3-2.1 [92.0 kB]\n",
"Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libopencore-amrwb0 amd64 0.1.3-2.1 [45.8 kB]\n",
"Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.4 [184 kB]\n",
"Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.4 [68.6 kB]\n",
"Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libid3tag0 amd64 0.15.1b-13 [31.2 kB]\n",
"Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libmad0 amd64 0.15.1b-9ubuntu18.04.1 [64.6 kB]\n",
"Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libsox3 amd64 14.4.2-3ubuntu0.18.04.1 [226 kB]\n",
"Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libsox-fmt-alsa amd64 14.4.2-3ubuntu0.18.04.1 [10.6 kB]\n",
"Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libsox-fmt-base amd64 14.4.2-3ubuntu0.18.04.1 [32.1 kB]\n",
"Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libsox-fmt-mp3 amd64 14.4.2-3ubuntu0.18.04.1 [15.9 kB]\n",
"Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 sox amd64 14.4.2-3ubuntu0.18.04.1 [101 kB]\n",
"Fetched 872 kB in 1s (675 kB/s)\n",
"debconf: unable to initialize frontend: Dialog\n",
"debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 11.)\n",
"debconf: falling back to frontend: Readline\n",
"debconf: unable to initialize frontend: Readline\n",
"debconf: (This frontend requires a controlling tty.)\n",
"debconf: falling back to frontend: Teletype\n",
"dpkg-preconfigure: unable to re-open stdin: \n",
"Selecting previously unselected package libopencore-amrnb0:amd64.\n",
"(Reading database ... 144594 files and directories currently installed.)\n",
"Preparing to unpack .../00-libopencore-amrnb0_0.1.3-2.1_amd64.deb ...\n",
"Unpacking libopencore-amrnb0:amd64 (0.1.3-2.1) ...\n",
"Selecting previously unselected package libopencore-amrwb0:amd64.\n",
"Preparing to unpack .../01-libopencore-amrwb0_0.1.3-2.1_amd64.deb ...\n",
"Unpacking libopencore-amrwb0:amd64 (0.1.3-2.1) ...\n",
"Selecting previously unselected package libmagic-mgc.\n",
"Preparing to unpack .../02-libmagic-mgc_1%3a5.32-2ubuntu0.4_amd64.deb ...\n",
"Unpacking libmagic-mgc (1:5.32-2ubuntu0.4) ...\n",
"Selecting previously unselected package libmagic1:amd64.\n",
"Preparing to unpack .../03-libmagic1_1%3a5.32-2ubuntu0.4_amd64.deb ...\n",
"Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.4) ...\n",
"Selecting previously unselected package libid3tag0:amd64.\n",
"Preparing to unpack .../04-libid3tag0_0.15.1b-13_amd64.deb ...\n",
"Unpacking libid3tag0:amd64 (0.15.1b-13) ...\n",
"Selecting previously unselected package libmad0:amd64.\n",
"Preparing to unpack .../05-libmad0_0.15.1b-9ubuntu18.04.1_amd64.deb ...\n",
"Unpacking libmad0:amd64 (0.15.1b-9ubuntu18.04.1) ...\n",
"Selecting previously unselected package libsox3:amd64.\n",
"Preparing to unpack .../06-libsox3_14.4.2-3ubuntu0.18.04.1_amd64.deb ...\n",
"Unpacking libsox3:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Selecting previously unselected package libsox-fmt-alsa:amd64.\n",
"Preparing to unpack .../07-libsox-fmt-alsa_14.4.2-3ubuntu0.18.04.1_amd64.deb ...\n",
"Unpacking libsox-fmt-alsa:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Selecting previously unselected package libsox-fmt-base:amd64.\n",
"Preparing to unpack .../08-libsox-fmt-base_14.4.2-3ubuntu0.18.04.1_amd64.deb ...\n",
"Unpacking libsox-fmt-base:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Selecting previously unselected package libsox-fmt-mp3:amd64.\n",
"Preparing to unpack .../09-libsox-fmt-mp3_14.4.2-3ubuntu0.18.04.1_amd64.deb ...\n",
"Unpacking libsox-fmt-mp3:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Selecting previously unselected package sox.\n",
"Preparing to unpack .../10-sox_14.4.2-3ubuntu0.18.04.1_amd64.deb ...\n",
"Unpacking sox (14.4.2-3ubuntu0.18.04.1) ...\n",
"Setting up libid3tag0:amd64 (0.15.1b-13) ...\n",
"Setting up libmagic-mgc (1:5.32-2ubuntu0.4) ...\n",
"Setting up libmagic1:amd64 (1:5.32-2ubuntu0.4) ...\n",
"Setting up libopencore-amrnb0:amd64 (0.1.3-2.1) ...\n",
"Setting up libmad0:amd64 (0.15.1b-9ubuntu18.04.1) ...\n",
"Setting up libopencore-amrwb0:amd64 (0.1.3-2.1) ...\n",
"Setting up libsox3:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Setting up libsox-fmt-mp3:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Setting up libsox-fmt-base:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Setting up libsox-fmt-alsa:amd64 (14.4.2-3ubuntu0.18.04.1) ...\n",
"Setting up sox (14.4.2-3ubuntu0.18.04.1) ...\n",
"Processing triggers for libc-bin (2.27-3ubuntu1) ...\n",
"/sbin/ldconfig.real: /usr/local/lib/python3.6/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link\n",
"\n",
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n",
"Processing triggers for mime-support (3.60ubuntu1) ...\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "va7ZUuWaKnbU",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 104
},
"outputId": "f2ced10d-f9be-4222-cb01-abddb52c8be2"
},
"source": [
"!pip3 install sox "
],
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
"text": [
"Collecting sox\n",
" Using cached sox-1.4.0-py2.py3-none-any.whl (39 kB)\n",
"Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from sox) (1.18.5)\n",
"Installing collected packages: sox\n",
"Successfully installed sox-1.4.0\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "GODL3BbaK_n_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 86
},
"outputId": "6b7271e3-58e5-42cb-ae86-2cf3742e412f"
},
"source": [
"!bin/import_cv2.py /content/es "
],
"execution_count": 21,
"outputs": [
{
"output_type": "stream",
"text": [
"Traceback (most recent call last):\n",
" File \"bin/import_cv2.py\", line 18, in <module>\n",
" from deepspeech_training.util.downloader import SIMPLE_BAR\n",
"ModuleNotFoundError: No module named 'deepspeech_training'\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "Q2F_0cK6LH0o",
"colab_type": "code",
"colab": {}
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment