Spaces:
Runtime error
Runtime error
added in-painting example
Browse files- notebooks/test_model.ipynb +30 -13
notebooks/test_model.ipynb
CHANGED
@@ -171,7 +171,7 @@
|
|
171 |
},
|
172 |
{
|
173 |
"cell_type": "markdown",
|
174 |
-
"id": "
|
175 |
"metadata": {},
|
176 |
"source": [
|
177 |
"### Generate continuations (\"out-painting\")"
|
@@ -180,7 +180,7 @@
|
|
180 |
{
|
181 |
"cell_type": "code",
|
182 |
"execution_count": null,
|
183 |
-
"id": "
|
184 |
"metadata": {},
|
185 |
"outputs": [],
|
186 |
"source": [
|
@@ -277,6 +277,33 @@
|
|
277 |
"display(Audio(track, rate=sample_rate))"
|
278 |
]
|
279 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
{
|
281 |
"cell_type": "markdown",
|
282 |
"id": "ef54cef3",
|
@@ -330,17 +357,7 @@
|
|
330 |
{
|
331 |
"cell_type": "code",
|
332 |
"execution_count": null,
|
333 |
-
"id": "
|
334 |
-
"metadata": {},
|
335 |
-
"outputs": [],
|
336 |
-
"source": [
|
337 |
-
"len(audio) / mel.hop_length"
|
338 |
-
]
|
339 |
-
},
|
340 |
-
{
|
341 |
-
"cell_type": "code",
|
342 |
-
"execution_count": null,
|
343 |
-
"id": "ad467206",
|
344 |
"metadata": {},
|
345 |
"outputs": [],
|
346 |
"source": []
|
|
|
171 |
},
|
172 |
{
|
173 |
"cell_type": "markdown",
|
174 |
+
"id": "993dac2a",
|
175 |
"metadata": {},
|
176 |
"source": [
|
177 |
"### Generate continuations (\"out-painting\")"
|
|
|
180 |
{
|
181 |
"cell_type": "code",
|
182 |
"execution_count": null,
|
183 |
+
"id": "22d526e3",
|
184 |
"metadata": {},
|
185 |
"outputs": [],
|
186 |
"source": [
|
|
|
277 |
"display(Audio(track, rate=sample_rate))"
|
278 |
]
|
279 |
},
|
280 |
+
{
|
281 |
+
"cell_type": "markdown",
|
282 |
+
"id": "bf63425e",
|
283 |
+
"metadata": {},
|
284 |
+
"source": [
|
285 |
+
"### Fill the gap (\"in-painting\")"
|
286 |
+
]
|
287 |
+
},
|
288 |
+
{
|
289 |
+
"cell_type": "code",
|
290 |
+
"execution_count": null,
|
291 |
+
"id": "79b52754",
|
292 |
+
"metadata": {},
|
293 |
+
"outputs": [],
|
294 |
+
"source": [
|
295 |
+
"slice = 3 #@param {type:\"integer\"}\n",
|
296 |
+
"audio = mel.get_audio_slice(slice)\n",
|
297 |
+
"_, (sample_rate,\n",
|
298 |
+
" audio2) = audio_diffusion.generate_spectrogram_and_audio_from_audio(\n",
|
299 |
+
" raw_audio=mel.get_audio_slice(slice),\n",
|
300 |
+
" generator=generator,\n",
|
301 |
+
" mask_start_secs=1,\n",
|
302 |
+
" mask_end_secs=1)\n",
|
303 |
+
"display(Audio(audio, rate=sample_rate))\n",
|
304 |
+
"display(Audio(audio2, rate=sample_rate))"
|
305 |
+
]
|
306 |
+
},
|
307 |
{
|
308 |
"cell_type": "markdown",
|
309 |
"id": "ef54cef3",
|
|
|
357 |
{
|
358 |
"cell_type": "code",
|
359 |
"execution_count": null,
|
360 |
+
"id": "a4f313f2",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
"metadata": {},
|
362 |
"outputs": [],
|
363 |
"source": []
|