Compare commits

..

No commits in common. "9982c06e0681544a4529e4c9b86609ed94048e06" and "a4ee17e17bcd5b0ad7afabed1d2e5dc1035b634c" have entirely different histories.

2 changed files with 19 additions and 6 deletions

View File

@ -102,7 +102,20 @@ def load_models(whisper_backend_name, whisper_model_name, alignment_model_name,
encodec_fn = f"{MODELS_PATH}/encodec_4cb2048_giga.th" encodec_fn = f"{MODELS_PATH}/encodec_4cb2048_giga.th"
if not os.path.exists(encodec_fn): if not os.path.exists(encodec_fn):
os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th -O " + encodec_fn) os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th")
# Define the source and destination paths
source_path = "/content/encodec_4cb2048_giga.th"
destination_path = "/content/VoiceCraft-gradio-colab/pretrained_models/encodec_4cb2048_giga.th"
# Move or copy the file to the correct location
try:
shutil.move(source_path, destination_path) # Use shutil.move for moving
print("File moved successfully.")
except FileNotFoundError:
print("File not found at the source path.")
except shutil.Error as e:
print("Error:", e)
voicecraft_model = { voicecraft_model = {
"config": config, "config": config,
@ -612,4 +625,4 @@ if __name__ == "__main__":
MODELS_PATH = args.models_path MODELS_PATH = args.models_path
app = get_app() app = get_app()
app.queue().launch(share=args.share, server_name="0.0.0.0", server_port=args.port) app.queue().launch(share=args.share, server_port=args.port)

View File

@ -7,7 +7,7 @@
"colab_type": "text" "colab_type": "text"
}, },
"source": [ "source": [
"<a href=\"https://colab.research.google.com/github/Sewlell/VoiceCraft/blob/master/voicecraft_gradio_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" "<a href=\"https://colab.research.google.com/github/Sewlell/VoiceCraft-gradio-colab/blob/master/voicecraft_gradio_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
] ]
}, },
{ {
@ -18,7 +18,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!git clone https://github.com/Sewlell/VoiceCraft.git" "!git clone https://github.com/Sewlell/VoiceCraft-gradio-colab.git"
] ]
}, },
{ {
@ -44,7 +44,7 @@
"\n", "\n",
"!pip install -e git+https://github.com/facebookresearch/audiocraft.git@c5157b5bf14bf83449c17ea1eeb66c19fb4bc7f0#egg=audiocraft\n", "!pip install -e git+https://github.com/facebookresearch/audiocraft.git@c5157b5bf14bf83449c17ea1eeb66c19fb4bc7f0#egg=audiocraft\n",
"\n", "\n",
"!pip install -r \"/content/VoiceCraft/gradio_requirements.txt\"\n", "!pip install -r \"/content/VoiceCraft-gradio-colab/gradio_requirements.txt\"\n",
"\n", "\n",
"!pip install typer==0.7.0" "!pip install typer==0.7.0"
] ]
@ -101,7 +101,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!python /content/VoiceCraft/gradio_app.py --demo-path=/content/VoiceCraft/demo --tmp-path=/content/VoiceCraft/demo/temp --models-path=/content/VoiceCraft/pretrained_models --share" "!python /content/VoiceCraft-gradio-colab/gradio_app.py --demo-path=/content/VoiceCraft-gradio-colab/demo --tmp-path=/content/VoiceCraft-gradio-colab/demo/temp --models-path=/content/VoiceCraft-gradio-colab/pretrained_models --share"
] ]
}, },
{ {