{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "authorship_tag": "ABX9TyN+xevYdvEEVskrZElzE6/6" }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "markdown", "source": [ "# RVC Playground\n", "\n", "\n", "Simply click `Runtime` in the top navigation bar and `Run all`. Wait for the output of the final cell to show the public gradio url and click on it.\n", "\n", "\n", "## credits :\n", "\n", "- [Rejekts](https://github.com/RejektsAI/EasyTools) : Original creator\n", "\n", "- [ Blane187](https://github.com/Blane187): create this colab notebook" ], "metadata": { "id": "j_bf0AWbbwlA" } }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "cNC0NDQyXIc9" }, "outputs": [], "source": [ "#@title install\n", "\n", "!git clone https://huggingface.co/spaces/Rejekts/RVC_PlayGround RVC\n", "!cd RVC && pip install -r requirements.txt --quiet\n", "!pip install yt_dlp ffmpeg --quiet" ] }, { "cell_type": "code", "source": [ "\n", "\n", "#@title download youtube acapella\n", "%cd /content/RVC\n", "url= \"https://youtu.be/F_BDaMGiNQw?si=XEjG4Zq6f8Ta4cU9\" #@param {type:\"string\"}\n", "\n", "AUDIO_NAME= \"cry_baby\" #@param {type:\"string\"}\n", "\n", "import yt_dlp\n", "import ffmpeg\n", "import sys\n", "\n", "\n", "ydl_opts = {\n", " 'format': 'bestaudio/best',\n", " # 'outtmpl': 'output.%(ext)s',\n", " 'postprocessors': [{\n", " 'key': 'FFmpegExtractAudio',\n", " 'preferredcodec': 'wav',\n", " }],\n", " \"outtmpl\": f'audios/{AUDIO_NAME}', # this is where you can edit how you'd like the filenames to be formatted\n", "}\n", "def download_from_url(url):\n", " ydl.download([url])\n", " # stream = ffmpeg.input('output.m4a')\n", " # stream = ffmpeg.output(stream, 'output.wav')\n", "\n", "\n", "with yt_dlp.YoutubeDL(ydl_opts) as ydl:\n", "\n", " download_from_url(url)" ], "metadata": { "cellView": "form", "id": "uGig8kXxaA6c" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "\n", "\n", "#@title run webui\n", "\n", "\n", "!python app.py" ], "metadata": { "cellView": "form", "id": "nBbnIzygXeJE" }, "execution_count": null, "outputs": [] } ] }