Skip to content

Commit

Permalink
deploy: b064586
Browse files Browse the repository at this point in the history
  • Loading branch information
genisplaja committed Nov 30, 2023
1 parent e962e94 commit 1eebe80
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 63 deletions.
36 changes: 28 additions & 8 deletions _sources/separation/singing-voice-extraction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,36 @@
"outputs": [],
"source": [
"# Importing and initializing a melodia instance\n",
"from compiam import load_model\n",
"import soundfile as sf\n",
"from compiam import load_model, load_dataset\n",
"separation_model = load_model('separation:cold-diff-sep')\n",
"\n",
"# Running extraction for an example track\n",
"# Loading an normalizing an example track\n",
"saraga_carnatic = load_dataset(\n",
" \"saraga_carnatic\",\n",
" data_home=os.path.join(\"..\", \"audio\", \"mir_datasets\")\n",
")\n",
"saraga_tracks = saraga_carnatic.load_tracks()\n",
"example = saraga_tracks[\"109_Sri_Raghuvara_Sugunaalaya\"]\n",
"input_mixture, sr = sf.read(example.audio_path)\n",
"\n",
"input_mixture = input_mixture.T\n",
"mean = np.mean(input_mixture, keepdims=True)\n",
"std = np.std(input_mixture, keepdims=True)\n",
"input_mixture = (input_mixture - mean) / (1e-6 + std)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"### Getting 30 seconds and separating\n",
"input_mixture = input_mixture[:, :44100*30]\n",
"separation = separation_model.separate(\n",
" input_data=os.path.join(\n",
" \"..\", \"audio\", \"mir_datasets\", \"saraga1.5_carnatic\",\n",
" \"Live at Vani Mahal by Sanjay Subrahmanyan\", \"Sri Raghuvara Sugunaalaya\",\n",
" \"Sanjay Subrahmanyan - Sri Raghuvara Sugunaalaya.mp3\"\n",
" ),\n",
" input_data=input_mixture,\n",
" input_sr=sr\n",
")"
]
},
Expand All @@ -109,7 +129,7 @@
"# And we play it!\n",
"ipd.Audio(\n",
" data=separation,\n",
" rate=22050,\n",
" rate=separation_model.sample_rate,\n",
")"
]
}
Expand Down
64 changes: 32 additions & 32 deletions melodic_analysis/exploring-raga.html
Original file line number Diff line number Diff line change
Expand Up @@ -1432,14 +1432,14 @@ <h3>3.1 Predominant pitch extraction<a class="headerlink" href="#predominant-pit
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>2023-11-29 22:48:31.864978: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library &#39;libcudart.so.11.0&#39;; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cv2/../../lib64:
2023-11-29 22:48:31.865007: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>2023-11-30 11:53:38.008753: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library &#39;libcudart.so.11.0&#39;; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cv2/../../lib64:
2023-11-30 11:53:38.008780: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>2023-11-29 22:48:33.012095: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library &#39;libcuda.so.1&#39;; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cv2/../../lib64:
2023-11-29 22:48:33.012123: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2023-11-29 22:48:33.012148: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (fv-az1247-986): /proc/driver/nvidia/version does not exist
2023-11-29 22:48:33.012329: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>2023-11-30 11:53:39.158627: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library &#39;libcuda.so.1&#39;; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/cv2/../../lib64:
2023-11-30 11:53:39.158653: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2023-11-30 11:53:39.158679: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (fv-az888-914): /proc/driver/nvidia/version does not exist
2023-11-30 11:53:39.158847: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
</pre></div>
</div>
Expand Down Expand Up @@ -1727,31 +1727,11 @@ <h3>3.2 Visualising predominant pitch<a class="headerlink" href="#visualising-pr
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{54.997834212038505: &#39;R2&#39;,
109.99566842407701: &#39;R2&#39;,
219.99133684815402: &#39;R2&#39;,
439.98267369630804: &#39;R2&#39;,
879.965347392616: &#39;R2&#39;,
58.268175617345825: &#39;G2&#39;,
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{58.268175617345825: &#39;G2&#39;,
116.53635123469165: &#39;G2&#39;,
233.0727024693833: &#39;G2&#39;,
466.1454049387666: &#39;G2&#39;,
932.2908098775332: &#39;G2&#39;,
82.40364421278775: &#39;D2&#39;,
164.8072884255755: &#39;D2&#39;,
329.614576851151: &#39;D2&#39;,
659.229153702302: &#39;D2&#39;,
1318.458307404604: &#39;D2&#39;,
65.40381575469627: &#39;M1&#39;,
130.80763150939254: &#39;M1&#39;,
261.6152630187851: &#39;M1&#39;,
523.2305260375701: &#39;M1&#39;,
1046.46105207514: &#39;M1&#39;,
73.4133009992652: &#39;P&#39;,
146.8266019985304: &#39;P&#39;,
293.6532039970608: &#39;P&#39;,
587.3064079941216: &#39;P&#39;,
1174.6128159882435: &#39;P&#39;,
87.30361988416256: &#39;N2&#39;,
174.60723976832512: &#39;N2&#39;,
349.21447953665023: &#39;N2&#39;,
Expand All @@ -1761,7 +1741,27 @@ <h3>3.2 Visualising predominant pitch<a class="headerlink" href="#visualising-pr
97.995: &#39;S&#39;,
195.99: &#39;S&#39;,
391.98: &#39;S&#39;,
783.96: &#39;S&#39;}
783.96: &#39;S&#39;,
54.997834212038505: &#39;R2&#39;,
109.99566842407701: &#39;R2&#39;,
219.99133684815402: &#39;R2&#39;,
439.98267369630804: &#39;R2&#39;,
879.965347392616: &#39;R2&#39;,
73.4133009992652: &#39;P&#39;,
146.8266019985304: &#39;P&#39;,
293.6532039970608: &#39;P&#39;,
587.3064079941216: &#39;P&#39;,
1174.6128159882435: &#39;P&#39;,
65.40381575469627: &#39;M1&#39;,
130.80763150939254: &#39;M1&#39;,
261.6152630187851: &#39;M1&#39;,
523.2305260375701: &#39;M1&#39;,
1046.46105207514: &#39;M1&#39;,
82.40364421278775: &#39;D2&#39;,
164.8072884255755: &#39;D2&#39;,
329.614576851151: &#39;D2&#39;,
659.229153702302: &#39;D2&#39;,
1318.458307404604: &#39;D2&#39;}
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -2200,7 +2200,7 @@ <h4>Fixing tonic errors in folded plots<a class="headerlink" href="#fixing-tonic
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x7f5dcda43d00&gt;]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x7f1579aca220&gt;]
</pre></div>
</div>
<img alt="../_images/exploring-raga_110_1.png" src="../_images/exploring-raga_110_1.png" />
Expand Down Expand Up @@ -2317,7 +2317,7 @@ <h4>Fixing tonic errors in folded plots<a class="headerlink" href="#fixing-tonic
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x7f5dcda3ea00&gt;]
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&lt;matplotlib.lines.Line2D at 0x7f1579abedf0&gt;]
</pre></div>
</div>
<img alt="../_images/exploring-raga_120_1.png" src="../_images/exploring-raga_120_1.png" />
Expand Down Expand Up @@ -2666,8 +2666,8 @@ <h3>3.5 Pitch density across rāga<a class="headerlink" href="#pitch-density-acr
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Rītigauḷa: {&#39;R2&#39;, &#39;G2&#39;, &#39;D2&#39;, &#39;M1&#39;, &#39;P&#39;, &#39;N2&#39;, &#39;S&#39;}
Bhairavi: {&#39;R2&#39;, &#39;D1&#39;, &#39;G2&#39;, &#39;D2&#39;, &#39;M1&#39;, &#39;P&#39;, &#39;N2&#39;, &#39;S&#39;}
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Rītigauḷa: {&#39;G2&#39;, &#39;N2&#39;, &#39;S&#39;, &#39;R2&#39;, &#39;P&#39;, &#39;M1&#39;, &#39;D2&#39;}
Bhairavi: {&#39;G2&#39;, &#39;N2&#39;, &#39;S&#39;, &#39;R2&#39;, &#39;P&#39;, &#39;D2&#39;, &#39;M1&#39;, &#39;D1&#39;}
</pre></div>
</div>
</div>
Expand Down
17 changes: 4 additions & 13 deletions melodic_analysis/raga-recognition.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,25 +623,16 @@ <h2> Contents </h2>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 0%| | 0.00/20.4M [00:00&lt;?, ?B/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 5%|▌ | 1.05M/20.4M [00:00&lt;00:02, 9.12MB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 23%|██▎ | 4.72M/20.4M [00:00&lt;00:00, 20.5MB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 23%|██▎ | 4.72M/20.4M [00:00&lt;00:01, 15.4MB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>100%|██████████| 20.4M/20.4M [00:00&lt;00:00, 67.6MB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 44%|████▎ | 8.91M/20.4M [00:00&lt;00:01, 10.2MB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 54%|█████▍ | 11.0M/20.4M [00:01&lt;00:01, 8.46MB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 85%|████████▍ | 17.3M/20.4M [00:01&lt;00:00, 13.4MB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>100%|██████████| 20.4M/20.4M [00:01&lt;00:00, 14.1MB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2023-11-29 22:50:07,412] WARNING [compiam.melody.raga_recognition.deepsrgm.download_model:155] Files downloaded and extracted successfully.
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2023-11-30 11:55:08,924] WARNING [compiam.melody.raga_recognition.deepsrgm.download_model:155] Files downloaded and extracted successfully.
</pre></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1eebe80

Please sign in to comment.