diff --git a/examples/ipynb/colab.ipynb b/examples/ipynb/colab.ipynb index f983282c2..d351a4b5c 100644 --- a/examples/ipynb/colab.ipynb +++ b/examples/ipynb/colab.ipynb @@ -1,24 +1,38 @@ { "cells": [ + { + "cell_type": "markdown", + "source": [ + "## Clone Repo" + ], + "metadata": { + "id": "xYJFXKP9xhQM" + } + }, { "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "hegwDOfffwzw", - "outputId": "1e221210-152b-4f5b-f009-9b9ffec2fa9f" + "id": "hegwDOfffwzw" }, "outputs": [], "source": [ + "!cd /content\n", "!rm -rf /content/ChatTTS\n", "!git clone https://github.com/2noise/ChatTTS.git\n", "!pip install -r /content/ChatTTS/requirements.txt\n", - "!pip install nemo_text_processing WeTextProcessing\n", "!ldconfig /usr/lib64-nvidia" ] }, + { + "cell_type": "markdown", + "source": [ + "## Import Libs" + ], + "metadata": { + "id": "zdzEFoknxqTH" + } + }, { "cell_type": "code", "execution_count": null, @@ -28,7 +42,7 @@ "outputs": [], "source": [ "from dotenv import load_dotenv\n", - "load_dotenv(\"sha256.env\")\n", + "load_dotenv(\"ChatTTS/sha256.env\")\n", "\n", "import torch\n", "torch._dynamo.config.cache_size_limit = 64\n", @@ -52,35 +66,17 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 49, - "referenced_widgets": [ - "c365a95346ec4b09a1e6467bf313baf7", - "d79fd51849fd463cb08b83fdb8e5ca0c", - "d247683a0a61441b971dfb39062e1fbf", - "1da23fc236034f32adcaf6bb2e0e7d80", - "4b2126d97c514795ab2a90f7357a203c", - "9775ce64008b417fac3edd55b9e999d9", - "96c9bb2eff4043b2a5dbd1e3e65375e5", - "20aa0031b7bb45bf82443b48b3694166", - "67252ea545d64392a1bd6ac40852e65f", - "2f920c00bcac4787a0078ee035e97b43", - "ba592297ff5347aebae298770a29fb8c" - ] - }, - "id": "e0QSkngRbSrg", - "outputId": "138ac28b-6a33-4c31-8fe3-8481bb213d02" + "id": "e0QSkngRbSrg" }, "outputs": [], "source": [ "chat = ChatTTS.Chat()\n", "\n", "# Use force_redownload=True if the weights updated.\n", - "chat.load_models(force_redownload=True)\n", + "chat.load_models(source = 'huggingface')\n", "\n", - "# If you download the weights manually, set source='locals'.\n", - "# chat.load_models(source='local', local_path='YOUR LOCAL PATH')" + "# If you download the weights manually, set source='custom'.\n", + "# chat.load_models(source='custom', custom_path='YOUR CUSTOM PATH')" ] }, { @@ -105,11 +101,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "Su9FmUYAbSrh", - "outputId": "7c2aa0c1-1f99-4da1-b2e5-bbcb93465d89" + "id": "Su9FmUYAbSrh" }, "outputs": [], "source": [ @@ -123,12 +115,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "YQRwB8lpbSri", - "outputId": "62ca9282-2755-44a5-ffca-c05c5e35ce76" + "id": "YQRwB8lpbSri" }, "outputs": [], "source": [ @@ -139,12 +126,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "LuFG6m7AbSri", - "outputId": "d8e0e3a2-d9fe-44db-e1f4-e2596289270e" + "id": "LuFG6m7AbSri" }, "outputs": [], "source": [ @@ -164,11 +146,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "kma0HBEBbSrj", - "outputId": "b80b9d2f-8248-41ee-f1d7-eb3bf331ee69" + "id": "kma0HBEBbSrj" }, "outputs": [], "source": [ @@ -183,12 +161,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "Nl_mT9KpbSrj", - "outputId": "1bfcc06a-5246-4d25-fc19-3d125362fa59" + "id": "Nl_mT9KpbSrj" }, "outputs": [], "source": [ @@ -208,11 +181,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "Qh7dcWrAbSrk", - "outputId": "3b936323-170a-496b-c4c2-6caa97a8d514" + "id": "Qh7dcWrAbSrk" }, "outputs": [], "source": [ @@ -227,12 +196,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "0ljWDWzabSrk", - "outputId": "8ade2469-c226-44ae-c3a7-ff034e2bffbf" + "id": "0ljWDWzabSrk" }, "outputs": [], "source": [ @@ -252,11 +216,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "3hAAc0lJbSrl", - "outputId": "8dc45586-fb2a-4e81-ee53-0ce6df2fc43a" + "id": "3hAAc0lJbSrl" }, "outputs": [], "source": [ @@ -269,11 +229,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "0GVJxhd3BKQX", - "outputId": "f1484519-7130-450a-b7d8-09de5fe2ffd1" + "id": "0GVJxhd3BKQX" }, "outputs": [], "source": [ @@ -284,12 +240,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "ngyMht74BicY", - "outputId": "8c7447ad-9ac7-4264-9f53-057d47d43931" + "id": "ngyMht74BicY" }, "outputs": [], "source": [ @@ -300,11 +251,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "R2WjuVrWbSrl", - "outputId": "0d644cb9-4d65-4147-bd99-d5451439be02" + "id": "R2WjuVrWbSrl" }, "outputs": [], "source": [ @@ -316,12 +263,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 76 - }, - "id": "71Y4pBdl-_Yd", - "outputId": "d44fdf1a-c9e8-42ff-ab96-8712986418fa" + "id": "71Y4pBdl-_Yd" }, "outputs": [], "source": [ @@ -406,354 +348,8 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "1da23fc236034f32adcaf6bb2e0e7d80": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_2f920c00bcac4787a0078ee035e97b43", - "placeholder": "​", - "style": "IPY_MODEL_ba592297ff5347aebae298770a29fb8c", - "value": " 11/11 [00:00<00:00, 762.51it/s]" - } - }, - "20aa0031b7bb45bf82443b48b3694166": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "2f920c00bcac4787a0078ee035e97b43": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "4b2126d97c514795ab2a90f7357a203c": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "67252ea545d64392a1bd6ac40852e65f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "96c9bb2eff4043b2a5dbd1e3e65375e5": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "9775ce64008b417fac3edd55b9e999d9": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "ba592297ff5347aebae298770a29fb8c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "c365a95346ec4b09a1e6467bf313baf7": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_d79fd51849fd463cb08b83fdb8e5ca0c", - "IPY_MODEL_d247683a0a61441b971dfb39062e1fbf", - "IPY_MODEL_1da23fc236034f32adcaf6bb2e0e7d80" - ], - "layout": "IPY_MODEL_4b2126d97c514795ab2a90f7357a203c" - } - }, - "d247683a0a61441b971dfb39062e1fbf": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_20aa0031b7bb45bf82443b48b3694166", - "max": 11, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_67252ea545d64392a1bd6ac40852e65f", - "value": 11 - } - }, - "d79fd51849fd463cb08b83fdb8e5ca0c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_9775ce64008b417fac3edd55b9e999d9", - "placeholder": "​", - "style": "IPY_MODEL_96c9bb2eff4043b2a5dbd1e3e65375e5", - "value": "Fetching 11 files: 100%" - } - } - } } }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file