Skip to content

Commit 6648a15

Browse files
committed
Cleaned up the module and examples. Ready to be used!
1 parent a2e70fc commit 6648a15

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

examples.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"- http://zafarrafii.com\n",
3333
"- https://github.com/zafarrafii\n",
3434
"- https://www.linkedin.com/in/zafarrafii/\n",
35-
"- 01/19/21"
35+
"- 01/20/21"
3636
]
3737
},
3838
{
@@ -100,9 +100,9 @@
100100
"background_signal = repet.original(audio_signal, sampling_frequency)\n",
101101
"foreground_signal = audio_signal-background_signal\n",
102102
"\n",
103-
"# Write the background and foreground signals\n",
104-
"# repet.wavwrite(background_signal, sampling_frequency, \"background_signal.wav\")\n",
105-
"# repet.wavwrite(foreground_signal, sampling_frequency, \"foreground_signal.wav\")\n",
103+
"Write the background and foreground signals\n",
104+
"repet.wavwrite(background_signal, sampling_frequency, \"background_signal.wav\")\n",
105+
"repet.wavwrite(foreground_signal, sampling_frequency, \"foreground_signal.wav\")\n",
106106
"\n",
107107
"# Compute the mixture, background, and foreground spectrograms\n",
108108
"window_length = pow(2, int(np.ceil(np.log2(0.04*sampling_frequency))))\n",
@@ -164,7 +164,7 @@
164164
},
165165
{
166166
"cell_type": "code",
167-
"execution_count": 1,
167+
"execution_count": 2,
168168
"metadata": {},
169169
"outputs": [
170170
{
@@ -260,7 +260,7 @@
260260
},
261261
{
262262
"cell_type": "code",
263-
"execution_count": 1,
263+
"execution_count": 3,
264264
"metadata": {},
265265
"outputs": [
266266
{
@@ -356,7 +356,7 @@
356356
},
357357
{
358358
"cell_type": "code",
359-
"execution_count": 1,
359+
"execution_count": 4,
360360
"metadata": {},
361361
"outputs": [
362362
{
@@ -452,7 +452,7 @@
452452
},
453453
{
454454
"cell_type": "code",
455-
"execution_count": 1,
455+
"execution_count": 5,
456456
"metadata": {},
457457
"outputs": [
458458
{
@@ -492,9 +492,9 @@
492492
"background_signal = repet.simonline(audio_signal, sampling_frequency)\n",
493493
"foreground_signal = audio_signal-background_signal\n",
494494
"\n",
495-
"# # Write the background and foreground signals\n",
496-
"# repet.wavwrite(background_signal, sampling_frequency, \"background_signal.wav\")\n",
497-
"# repet.wavwrite(foreground_signal, sampling_frequency, \"foreground_signal.wav\")\n",
495+
"# Write the background and foreground signals\n",
496+
"repet.wavwrite(background_signal, sampling_frequency, \"background_signal.wav\")\n",
497+
"repet.wavwrite(foreground_signal, sampling_frequency, \"foreground_signal.wav\")\n",
498498
"\n",
499499
"# Compute the mixture, background, and foreground spectrograms\n",
500500
"window_length = pow(2, int(np.ceil(np.log2(0.04*sampling_frequency))))\n",

repet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
http://zafarrafii.com
3131
https://github.com/zafarrafii
3232
https://www.linkedin.com/in/zafarrafii/
33-
01/19/21
33+
01/20/21
3434
"""
3535

3636
import numpy as np
@@ -1548,4 +1548,4 @@ def _simmask(audio_spectrogram, similarity_indices):
15481548
audio_spectrogram + np.finfo(float).eps
15491549
)
15501550

1551-
return repeating_mask
1551+
return repeating_mask

0 commit comments

Comments
 (0)