{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "spleeter.ipynb",
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "K6mcSc0mmp3i",
"colab_type": "text"
},
"source": [
"# Install spleeter"
]
},
{
"cell_type": "code",
"metadata": {
"id": "f8Brdfh6mzEz",
"colab_type": "code",
"colab": {}
},
"source": [
"!apt install ffmpeg"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "V_6Ram1lmc1F",
"colab_type": "code",
"colab": {}
},
"source": [
"pip install spleeter"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "W0LktyMypXqE",
"colab_type": "code",
"colab": {}
},
"source": [
"from IPython.display import Audio"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "afbcUSken16L",
"colab_type": "text"
},
"source": [
"# Separate from command line"
]
},
{
"cell_type": "code",
"metadata": {
"id": "O1kQaoJSoAD0",
"colab_type": "code",
"colab": {}
},
"source": [
"!wget https://github.com/deezer/spleeter/raw/master/audio_example.mp3"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "ibG6uF55p4lH",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"outputId": "de48652c-e4f1-4363-eda8-f422b7fbd3ec"
},
"source": [
"Audio('audio_example.mp3')"
],
"execution_count": 19,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"\n",
" \n",
" "
],
"text/plain": [
""
]
},
"metadata": {
"tags": []
},
"execution_count": 19
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "kOAqBcPhn6IU",
"colab_type": "code",
"colab": {}
},
"source": [
"!spleeter separate -h"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "dGL-k5xxoKbu",
"colab_type": "code",
"colab": {}
},
"source": [
"!spleeter separate -i audio_example.mp3 -o output/"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "IDuPWcAMoZP_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 63
},
"outputId": "3f9a05fd-afab-41c7-d47c-433fc614283b"
},
"source": [
"!ls output/audio_example"
],
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"text": [
"accompaniment.wav vocals.wav\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "e7CHpyiloxrk",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"outputId": "d01d2c69-8516-4ae5-b0a4-fa1395253093"
},
"source": [
"Audio('output/audio_example/vocals.wav')"
],
"execution_count": 15,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"\n",
" \n",
" "
],
"text/plain": [
""
]
},
"metadata": {
"tags": []
},
"execution_count": 15
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ibXd-WCTpT0w",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"outputId": "c31115aa-645e-4636-fb81-05411b7e3e95"
},
"source": [
"Audio('output/audio_example/accompaniment.wav')"
],
"execution_count": 16,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"\n",
" \n",
" "
],
"text/plain": [
""
]
},
"metadata": {
"tags": []
},
"execution_count": 16
}
]
}
]
}