Upload Playground.ipynb

#6
Files changed (1) hide show
  1. Playground.ipynb +113 -0
Playground.ipynb ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "authorship_tag": "ABX9TyN+xevYdvEEVskrZElzE6/6"
8
+ },
9
+ "kernelspec": {
10
+ "name": "python3",
11
+ "display_name": "Python 3"
12
+ },
13
+ "language_info": {
14
+ "name": "python"
15
+ }
16
+ },
17
+ "cells": [
18
+ {
19
+ "cell_type": "markdown",
20
+ "source": [
21
+ "# RVC Playground\n",
22
+ "\n",
23
+ "\n",
24
+ "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",
25
+ "\n",
26
+ "\n",
27
+ "## credits :\n",
28
+ "\n",
29
+ "- [Rejekts](https://github.com/RejektsAI/EasyTools) : Original creator\n",
30
+ "\n",
31
+ "- [ Blane187](https://github.com/Blane187): create this colab notebook"
32
+ ],
33
+ "metadata": {
34
+ "id": "j_bf0AWbbwlA"
35
+ }
36
+ },
37
+ {
38
+ "cell_type": "code",
39
+ "execution_count": null,
40
+ "metadata": {
41
+ "cellView": "form",
42
+ "id": "cNC0NDQyXIc9"
43
+ },
44
+ "outputs": [],
45
+ "source": [
46
+ "#@title install\n",
47
+ "\n",
48
+ "!git clone https://huggingface.co/spaces/Rejekts/RVC_PlayGround RVC\n",
49
+ "!cd RVC && pip install -r requirements.txt --quiet\n",
50
+ "!pip install yt_dlp ffmpeg --quiet"
51
+ ]
52
+ },
53
+ {
54
+ "cell_type": "code",
55
+ "source": [
56
+ "\n",
57
+ "\n",
58
+ "#@title download youtube acapella\n",
59
+ "%cd /content/RVC\n",
60
+ "url= \"https://youtu.be/F_BDaMGiNQw?si=XEjG4Zq6f8Ta4cU9\" #@param {type:\"string\"}\n",
61
+ "\n",
62
+ "AUDIO_NAME= \"cry_baby\" #@param {type:\"string\"}\n",
63
+ "\n",
64
+ "import yt_dlp\n",
65
+ "import ffmpeg\n",
66
+ "import sys\n",
67
+ "\n",
68
+ "\n",
69
+ "ydl_opts = {\n",
70
+ " 'format': 'bestaudio/best',\n",
71
+ " # 'outtmpl': 'output.%(ext)s',\n",
72
+ " 'postprocessors': [{\n",
73
+ " 'key': 'FFmpegExtractAudio',\n",
74
+ " 'preferredcodec': 'wav',\n",
75
+ " }],\n",
76
+ " \"outtmpl\": f'audios/{AUDIO_NAME}', # this is where you can edit how you'd like the filenames to be formatted\n",
77
+ "}\n",
78
+ "def download_from_url(url):\n",
79
+ " ydl.download([url])\n",
80
+ " # stream = ffmpeg.input('output.m4a')\n",
81
+ " # stream = ffmpeg.output(stream, 'output.wav')\n",
82
+ "\n",
83
+ "\n",
84
+ "with yt_dlp.YoutubeDL(ydl_opts) as ydl:\n",
85
+ "\n",
86
+ " download_from_url(url)"
87
+ ],
88
+ "metadata": {
89
+ "cellView": "form",
90
+ "id": "uGig8kXxaA6c"
91
+ },
92
+ "execution_count": null,
93
+ "outputs": []
94
+ },
95
+ {
96
+ "cell_type": "code",
97
+ "source": [
98
+ "\n",
99
+ "\n",
100
+ "#@title run webui\n",
101
+ "\n",
102
+ "\n",
103
+ "!python app.py"
104
+ ],
105
+ "metadata": {
106
+ "cellView": "form",
107
+ "id": "nBbnIzygXeJE"
108
+ },
109
+ "execution_count": null,
110
+ "outputs": []
111
+ }
112
+ ]
113
+ }