Skip to content

Commit

Permalink
fix: switch to a previous version of pip R3gm#68
Browse files Browse the repository at this point in the history
  • Loading branch information
R3gm committed Jul 28, 2024
1 parent dd0cced commit ec4ff44
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 93 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Before you start installing and using SoniTranslate, there are a few things you

1. Install the NVIDIA drivers for CUDA 11.8.0, NVIDIA CUDA is a parallel computing platform and programming model that enables developers to use the power of NVIDIA graphics processing units (GPUs) to speed up compute-intensive tasks. You can find the drivers [here](https://developer.nvidia.com/cuda-toolkit-archive). Follow the instructions on the website to download and install the drivers.
2. Accept the license agreement for using Pyannote. You need to have an account on Hugging Face and `accept the license to use the models`: https://huggingface.co/pyannote/speaker-diarization and https://huggingface.co/pyannote/segmentation
3. Create a [huggingface token](https://huggingface.co/settings/tokens). Hugging Face is a natural language processing platform that provides access to state-of-the-art models and tools. You will need to create a token in order to use some of the automatic model download features in SoniTranslate. Follow the instructions on the Hugging Face website to create a token.
3. Create a [huggingface token](https://huggingface.co/settings/tokens). Hugging Face is a natural language processing platform that provides access to state-of-the-art models and tools. You will need to create a token in order to use some of the automatic model download features in SoniTranslate. Follow the instructions on the Hugging Face website to create a token. When you are creating the new Access Token in Hugging Face, make sure to tick "Read access to contents of all public gated repos you can access".
4. Install [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/). Anaconda is a free and open-source distribution of Python and R. It includes a package manager called conda that makes it easy to install and manage Python environments and packages. Follow the instructions on the Anaconda website to download and install Anaconda on your system.
5. Install Git for your system. Git is a version control system that helps you track changes to your code and collaborate with other developers. You can install Git with Anaconda by running `conda install -c anaconda git -y` in your terminal (Do this after step 1 in the following section.). If you have trouble installing Git via Anaconda, you can use the following link instead:
- [Git for Linux](https://git-scm.com/download/linux)
Expand All @@ -179,6 +179,7 @@ To install SoniTranslate, follow these steps:
```
conda create -n sonitr python=3.10 -y
conda activate sonitr
python -m pip install pip==23.1.2
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
```

Expand Down Expand Up @@ -260,6 +261,24 @@ conda env remove -n sonitr

With the `sonitr` environment removed, you can start over with a fresh installation.

### Notes

- Alternatively, you can set your Hugging Face token as a permanent environment variable with:

```
conda activate sonitr
conda env config vars set YOUR_HF_TOKEN="YOUR_HUGGING_FACE_TOKEN_HERE"
conda deactivate
```

- To use OpenAI's GPT API for translation, tts or transcription, set up your OpenAI API key as an environment variable in quotes:

```
conda activate sonitr
conda env config vars set OPENAI_API_KEY="your-api-key-here"
conda deactivate
```

## Command line arguments

The app_rvc.py script supports command-line arguments to customize its behavior. Here's a brief guide on how to use them:
Expand Down
91 changes: 46 additions & 45 deletions SoniTranslate_Colab.ipynb
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"gpuType": "T4",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"<a href=\"https://colab.research.google.com/github/R3gm/SoniTranslate/blob/main/SoniTranslate_Colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "8lw0EgLex-YZ"
},
"source": [
"# SoniTranslate\n",
"\n",
Expand All @@ -38,24 +24,23 @@
"| 🚀 Online Demo in HF | [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/r3gm/SoniTranslate_translate_audio_of_a_video_content) |\n",
"\n",
"\n"
],
"metadata": {
"id": "8lw0EgLex-YZ"
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "LUgwm0rfx0_J",
"cellView": "form"
"cellView": "form",
"id": "LUgwm0rfx0_J"
},
"outputs": [],
"source": [
"# @title Install requirements for SoniTranslate\n",
"!git clone https://github.com/r3gm/SoniTranslate.git\n",
"%cd SoniTranslate\n",
"\n",
"!pip uninstall chex pandas-stubs ibis-framework albumentations albucore -y -q\n",
"!python -m pip install -q pip==23.1.2\n",
"!apt install git-lfs\n",
"!git lfs install\n",
"\n",
Expand All @@ -78,20 +63,25 @@
},
{
"cell_type": "markdown",
"metadata": {
"id": "LTaTstXPXNg2"
},
"source": [
"One important step is to accept the license agreement for using Pyannote. You need to have an account on Hugging Face and `accept the license to use the models`: https://huggingface.co/pyannote/speaker-diarization and https://huggingface.co/pyannote/segmentation\n",
"\n",
"Get your KEY TOKEN here: https://hf.co/settings/tokens\n",
"\n",
"\n",
"\n",
"Get your KEY TOKEN here: https://hf.co/settings/tokens"
],
"metadata": {
"id": "LTaTstXPXNg2"
}
"When you are creating the new Access Token in Hugging Face, make sure to tick \"Read access to contents of all public gated repos you can access\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "XkhXfaFw4R4J"
},
"outputs": [],
"source": [
"#@markdown # `RUN THE WEB APP`\n",
"YOUR_HF_TOKEN = \"\" #@param {type:'string'}\n",
Expand All @@ -103,22 +93,33 @@
"\n",
"%cd /content/SoniTranslate\n",
"!python app_rvc.py --theme {theme} --verbosity_level {verbosity_level} --language {interface_language} --public_url"
],
"metadata": {
"id": "XkhXfaFw4R4J",
"cellView": "form"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"Open the `public URL` when it appears"
],
"metadata": {
"id": "KJW3KrhZJh0u"
}
},
"source": [
"Open the `public URL` when it appears"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"include_colab_link": true,
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
]
}
},
"nbformat": 4,
"nbformat_minor": 0
}
92 changes: 47 additions & 45 deletions SoniTranslate_Colab_embedded.ipynb
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"gpuType": "T4",
"toc_visible": true,
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"<a href=\"https://colab.research.google.com/github/R3gm/SoniTranslate/blob/main/SoniTranslate_Colab_embedded.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "8lw0EgLex-YZ"
},
"source": [
"# SoniTranslate embedded app\n",
"\n",
Expand All @@ -41,24 +26,23 @@
"| 🚀 Online Demo in HF | [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/r3gm/SoniTranslate_translate_audio_of_a_video_content) |\n",
"\n",
"\n"
],
"metadata": {
"id": "8lw0EgLex-YZ"
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "LUgwm0rfx0_J",
"cellView": "form"
"cellView": "form",
"id": "LUgwm0rfx0_J"
},
"outputs": [],
"source": [
"# @title Install requirements for SoniTranslate\n",
"!git clone https://github.com/r3gm/SoniTranslate.git\n",
"%cd SoniTranslate\n",
"\n",
"!pip uninstall chex pandas-stubs ibis-framework albumentations albucore -y -q\n",
"!python -m pip install -q pip==23.1.2\n",
"!apt install git-lfs\n",
"!git lfs install\n",
"\n",
Expand All @@ -81,29 +65,35 @@
},
{
"cell_type": "markdown",
"metadata": {
"id": "LTaTstXPXNg2"
},
"source": [
"One important step is to accept the license agreement for using Pyannote. You need to have an account on Hugging Face and `accept the license to use the models`: https://huggingface.co/pyannote/speaker-diarization and https://huggingface.co/pyannote/segmentation\n",
"\n",
"\n",
"Get your KEY TOKEN here: https://hf.co/settings/tokens\n",
"\n",
"\n",
"Get your KEY TOKEN here: https://hf.co/settings/tokens"
],
"metadata": {
"id": "LTaTstXPXNg2"
}
"When you are creating the new Access Token in Hugging Face, make sure to tick \"Read access to contents of all public gated repos you can access\"."
]
},
{
"cell_type": "markdown",
"source": [
"Directory output: /content/SoniTranslate/outputs"
],
"metadata": {
"id": "NRAsK95dJSgq"
}
},
"source": [
"Directory output: /content/SoniTranslate/outputs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "XkhXfaFw4R4J"
},
"outputs": [],
"source": [
"#@markdown # `RUN THE WEB APP`\n",
"YOUR_HF_TOKEN = \"\" #@param {type:'string'}\n",
Expand Down Expand Up @@ -2981,13 +2971,25 @@
" quiet=False,\n",
" debug=True,\n",
" )"
],
"metadata": {
"id": "XkhXfaFw4R4J",
"cellView": "form"
},
"execution_count": null,
"outputs": []
]
}
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"include_colab_link": true,
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
4 changes: 2 additions & 2 deletions docs/windows_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Before you start installing and using SoniTranslate, there are a few things you
3. If you see that your CUDA version is less than 11.8, you should update your NVIDIA driver. Visit the NVIDIA website's driver download page (https://www.nvidia.com/Download/index.aspx) and enter your graphics card information.

4. Accept the license agreement for using Pyannote. You need to have an account on Hugging Face and `accept the license to use the models`: https://huggingface.co/pyannote/speaker-diarization and https://huggingface.co/pyannote/segmentation
5. Create a [huggingface token](https://huggingface.co/settings/tokens). Hugging Face is a natural language processing platform that provides access to state-of-the-art models and tools. You will need to create a token in order to use some of the automatic model download features in SoniTranslate. Follow the instructions on the Hugging Face website to create a token.
5. Create a [huggingface token](https://huggingface.co/settings/tokens). Hugging Face is a natural language processing platform that provides access to state-of-the-art models and tools. You will need to create a token in order to use some of the automatic model download features in SoniTranslate. Follow the instructions on the Hugging Face website to create a token. When you are creating the new Access Token in Hugging Face, make sure to tick "Read access to contents of all public gated repos you can access".
6. Install [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/). Anaconda is a free and open-source distribution of Python and R. It includes a package manager called conda that makes it easy to install and manage Python environments and packages. Follow the instructions on the Anaconda website to download and install Anaconda on your system.
7. Install Git for your system. Git is a version control system that helps you track changes to your code and collaborate with other developers. You can install Git with Anaconda by running `conda install -c anaconda git -y` in your terminal (Do this after step 1 in the following section.). If you have trouble installing Git via Anaconda, you can use the following link instead:
- [Git for Windows](https://git-scm.com/download/win)
Expand All @@ -44,6 +44,7 @@ To install SoniTranslate, follow these steps:
```
conda create -n sonitr python=3.10 -y
conda activate sonitr
python -m pip install pip==23.1.2
```

2. Clone this github repository and navigate to it:
Expand Down Expand Up @@ -100,7 +101,6 @@ conda env config vars set YOUR_HF_TOKEN="YOUR_HUGGING_FACE_TOKEN_HERE"
conda deactivate
```


### Running SoniTranslate

To run SoniTranslate locally, make sure the `sonitr` conda environment is active:
Expand Down

0 comments on commit ec4ff44

Please sign in to comment.