File size: 4,271 Bytes
710db5f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "---\n",
        "\n",
        "πŸ“Œ **This notebook has been updated [here](https://github.com/jhj0517/Whisper-WebUI.git)!**\n",
        "\n",
        "πŸ–‹ **Author**: [jhj0517](https://github.com/jhj0517/Whisper-WebUI/blob/master/notebook/whisper-webui.ipynb)\n",
        "\n",
        "😎 **Support the Project**:\n",
        "\n",
        "If you find this project useful, please consider supporting it:\n",
        "\n",
        "<a href=\"https://ko-fi.com/jhj0517\" target=\"_blank\">\n",
        "    <img src=\"https://storage.ko-fi.com/cdn/kofi2.png?v=3\" alt=\"Buy Me a Coffee at ko-fi.com\" height=\"36\">\n",
        "</a>\n",
        "\n",
        "---"
      ],
      "metadata": {
        "id": "doKhBBXIfS21"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "#@title #(Optional) Check GPU\n",
        "#@markdown Some models may not function correctly on a CPU runtime.\n",
        "\n",
        "#@markdown so you should check your GPU setup before run.\n",
        "!nvidia-smi"
      ],
      "metadata": {
        "id": "23yZvUlagEsx",
        "cellView": "form"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kNbSbsctxahq",
        "cellView": "form"
      },
      "outputs": [],
      "source": [
        "#@title #Installation\n",
        "#@markdown This cell will install dependencies for Whisper-WebUI!\n",
        "!git clone https://github.com/jhj0517/Whisper-WebUI.git\n",
        "%cd Whisper-WebUI\n",
        "!pip install git+https://github.com/jhj0517/jhj0517-whisper.git\n",
        "!pip install faster-whisper==1.0.3\n",
        "!pip install gradio==4.43.0\n",
        "# Temporal bug fix from https://github.com/jhj0517/Whisper-WebUI/issues/256\n",
        "!pip install git+https://github.com/JuanBindez/pytubefix.git\n",
        "!pip install tokenizers==0.19.1\n",
        "!pip install pyannote.audio==3.3.1\n",
        "!pip install git+https://github.com/jhj0517/ultimatevocalremover_api.git"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#@title # (Optional) Configure arguments\n",
        "#@markdown This section is used to configure some command line arguments.\n",
        "\n",
        "#@markdown You can simply ignore this section and the default values will be used.\n",
        "\n",
        "USERNAME = '' #@param {type: \"string\"}\n",
        "PASSWORD = '' #@param {type: \"string\"}\n",
        "WHISPER_TYPE = 'faster-whisper' # @param [\"whisper\", \"faster-whisper\", \"insanely-fast-whisper\"]\n",
        "THEME = '' #@param {type: \"string\"}\n",
        "\n",
        "arguments = \"\"\n",
        "if USERNAME:\n",
        "  arguments += f\" --username {USERNAME}\"\n",
        "if PASSWORD:\n",
        "  arguments += f\" --password {PASSWORD}\"\n",
        "if THEME:\n",
        "  arguments += f\" --theme {THEME}\"\n",
        "if WHISPER_TYPE:\n",
        "  arguments += f\" --whisper_type {WHISPER_TYPE}\"\n",
        "\n",
        "\n",
        "#@markdown If you wonder how these arguments are used, you can see the [Wiki](https://github.com/jhj0517/Whisper-WebUI/wiki/Command-Line-Arguments)."
      ],
      "metadata": {
        "id": "Qosz9BFlGui3",
        "cellView": "form"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "id": "PQroYRRZzQiN",
        "cellView": "form"
      },
      "outputs": [],
      "source": [
        "#@title #Run\n",
        "#@markdown Once the installation is complete, you can use public URL that is displayed.\n",
        "if 'arguments' in locals():\n",
        "  !python app.py --share --colab{arguments}\n",
        "else:\n",
        "    !python app.py --share --colab"
      ]
    }
  ],
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4"
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU"
  },
  "nbformat": 4,
  "nbformat_minor": 0
}