Skip to content

Commit

Permalink
install pydub
Browse files Browse the repository at this point in the history
  • Loading branch information
ardha27 committed May 7, 2023
1 parent 7029391 commit 9cdd341
Showing 1 changed file with 19 additions and 48 deletions.
67 changes: 19 additions & 48 deletions AI_Song_Cover_SOVITS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
"provenance": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
Expand All @@ -16,6 +17,16 @@
"gpuClass": "standard"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/ardha27/AI-Song-Cover-SOVITS/blob/main/AI_Song_Cover_SOVITS.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"source": [
Expand Down Expand Up @@ -384,8 +395,7 @@
"# Try comment this line below if you got Runtime Error\n",
"try:\n",
" display(Audio(f\"{AUDIO}.out.wav\", autoplay=True))\n",
"except Exception as e:",
" print(\"Error:\", str(e))\n"
"except Exception as e: print(\"Error:\", str(e))\n"
],
"metadata": {
"id": "dLDnmZ9pH0mG"
Expand Down Expand Up @@ -413,54 +423,16 @@
"!wget -N \"https://huggingface.co/TachibanaKimika/so-vits-svc-4.0-models/resolve/main/riri/config.json\" -P so-vits-test/"
],
"metadata": {
"id": "MAEujsmx7-U8",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "30ceb002-89a9-485e-ab40-05a905388bb0"
"id": "MAEujsmx7-U8"
},
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2023-04-25 18:34:44-- https://huggingface.co/TachibanaKimika/so-vits-svc-4.0-models/resolve/main/riri/G_riri_220.pth\n",
"Resolving huggingface.co (huggingface.co)... 13.35.7.13, 13.35.7.28, 13.35.7.88, ...\n",
"Connecting to huggingface.co (huggingface.co)|13.35.7.13|:443... connected.\n",
"HTTP request sent, awaiting response... 302 Found\n",
"Location: https://cdn-lfs.huggingface.co/repos/29/9d/299dc503dd70e9f70e46b2f76f123a3c54dc7cf3016592b42bbbd32fef581441/ea35e1be6406dee11d7c05e540aec4f63fe41eea0ca76112234e692fef9314b0?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27G_riri_220.pth%3B+filename%3D%22G_riri_220.pth%22%3B&Expires=1682706760&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzI5LzlkLzI5OWRjNTAzZGQ3MGU5ZjcwZTQ2YjJmNzZmMTIzYTNjNTRkYzdjZjMwMTY1OTJiNDJiYmJkMzJmZWY1ODE0NDEvZWEzNWUxYmU2NDA2ZGVlMTFkN2MwNWU1NDBhZWM0ZjYzZmU0MWVlYTBjYTc2MTEyMjM0ZTY5MmZlZjkzMTRiMD9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2ODI3MDY3NjB9fX1dfQ__&Signature=r9skSdxXYF24-O8AIg1JosN-UFrYppnBqAr3ril5viti9jSiNIUEhv3sqKefauEosYZadERfftqU%7ENPA4gRuy8HP8TBnyzULh8lZcfzH9u9yokBWaoa7rJYFp70NgW0QKYuRINa%7EOMkncgsyDb6AVVeYJVY5K-uB0tICXVWdCgTtmLpPwC4N6Ddyugk83zv3WM0mtrGeMvN8rOZKrNAmp8kwdRaWeXLADDSFYZ1d%7EjJGfL8L5S9a4wbI98Rzv1uJPyrS-NdPBuqPNHq7OM-OjaVBKYLyp9629EFMXP9tE1QVsSQUXsW2iTGl%7Ew1OeBrax7PljxHe3lEc3sWM3PsLqg__&Key-Pair-Id=KVTP0A1DKRTAX [following]\n",
"--2023-04-25 18:34:45-- https://cdn-lfs.huggingface.co/repos/29/9d/299dc503dd70e9f70e46b2f76f123a3c54dc7cf3016592b42bbbd32fef581441/ea35e1be6406dee11d7c05e540aec4f63fe41eea0ca76112234e692fef9314b0?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27G_riri_220.pth%3B+filename%3D%22G_riri_220.pth%22%3B&Expires=1682706760&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzI5LzlkLzI5OWRjNTAzZGQ3MGU5ZjcwZTQ2YjJmNzZmMTIzYTNjNTRkYzdjZjMwMTY1OTJiNDJiYmJkMzJmZWY1ODE0NDEvZWEzNWUxYmU2NDA2ZGVlMTFkN2MwNWU1NDBhZWM0ZjYzZmU0MWVlYTBjYTc2MTEyMjM0ZTY5MmZlZjkzMTRiMD9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2ODI3MDY3NjB9fX1dfQ__&Signature=r9skSdxXYF24-O8AIg1JosN-UFrYppnBqAr3ril5viti9jSiNIUEhv3sqKefauEosYZadERfftqU%7ENPA4gRuy8HP8TBnyzULh8lZcfzH9u9yokBWaoa7rJYFp70NgW0QKYuRINa%7EOMkncgsyDb6AVVeYJVY5K-uB0tICXVWdCgTtmLpPwC4N6Ddyugk83zv3WM0mtrGeMvN8rOZKrNAmp8kwdRaWeXLADDSFYZ1d%7EjJGfL8L5S9a4wbI98Rzv1uJPyrS-NdPBuqPNHq7OM-OjaVBKYLyp9629EFMXP9tE1QVsSQUXsW2iTGl%7Ew1OeBrax7PljxHe3lEc3sWM3PsLqg__&Key-Pair-Id=KVTP0A1DKRTAX\n",
"Resolving cdn-lfs.huggingface.co (cdn-lfs.huggingface.co)... 13.35.7.14, 13.35.7.113, 13.35.7.93, ...\n",
"Connecting to cdn-lfs.huggingface.co (cdn-lfs.huggingface.co)|13.35.7.14|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 542789405 (518M) [application/zip]\n",
"Saving to: ‘so-vits-test/G_riri_220.pth’\n",
"\n",
"G_riri_220.pth 100%[===================>] 517.64M 94.4MB/s in 5.5s \n",
"\n",
"2023-04-25 18:34:50 (94.6 MB/s) - ‘so-vits-test/G_riri_220.pth’ saved [542789405/542789405]\n",
"\n",
"--2023-04-25 18:34:50-- https://huggingface.co/TachibanaKimika/so-vits-svc-4.0-models/resolve/main/riri/config.json\n",
"Resolving huggingface.co (huggingface.co)... 13.35.7.13, 13.35.7.28, 13.35.7.88, ...\n",
"Connecting to huggingface.co (huggingface.co)|13.35.7.13|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 1569 (1.5K) [text/plain]\n",
"Saving to: ‘so-vits-test/config.json’\n",
"\n",
"config.json 100%[===================>] 1.53K --.-KB/s in 0s \n",
"\n",
"Last-modified header missing -- time-stamps turned off.\n",
"2023-04-25 18:34:51 (218 MB/s) - ‘so-vits-test/config.json’ saved [1569/1569]\n",
"\n"
]
}
]
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"#@title 5.3 Combine Vocal and Instrument (Song Cover)\n",
"!pip install pydub\n",
"from pydub import AudioSegment\n",
"\n",
"VOCAL = \"/content/separated/htdemucs/audio/vocals.out.wav\" #@param {type:\"string\"}\n",
Expand All @@ -474,8 +446,7 @@
"combined.export(\"/content/FinalCover.wav\", format='wav')\n",
"try:\n",
" display(Audio(f\"/content/FinalCover.wav\", autoplay=True))\n",
"except Exception as e:",
" print(\"Error:\", str(e))\n"
"except Exception as e: print(\"Error:\", str(e))\n"
],
"metadata": {
"id": "w781LsPh_2Xf"
Expand Down Expand Up @@ -653,4 +624,4 @@
"outputs": []
}
]
}
}

0 comments on commit 9cdd341

Please sign in to comment.