Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fastai2_audio/augment/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Cell
import colorednoise as cn

# Cell
#nbdev_comment _all_ = ["AudioPadType", "NoiseColor"]

# Cell
mk_class('AudioPadType', **{o:o.lower() for o in ['Zeros', 'Zeros_After', 'Repeat']},
doc="All methods of padding audio as attributes to get tab-completion and typo-proofing")
Expand Down
1 change: 1 addition & 0 deletions fastai2_audio/core/spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def show_spectrogram(sg, ax, ctx, figsize, **kwargs):
r, c = nchannels, sg.data.shape[0]//nchannels
proper_kwargs = get_usable_kwargs(specshow, sg._settings, exclude=["ax", "kwargs", "data",])
if (r == 1 and c == 1):
if ax is None: _,ax = plt.subplots(1, 1, figsize=figsize)
_show_spectrogram(sg, ax, proper_kwargs, **kwargs)
plt.title("Channel 0 Image 0: {} X {}px".format(*sg.shape[-2:]))
else:
Expand Down
1 change: 1 addition & 0 deletions nbs/01_Core_Spectrogram.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
" r, c = nchannels, sg.data.shape[0]//nchannels\n",
" proper_kwargs = get_usable_kwargs(specshow, sg._settings, exclude=[\"ax\", \"kwargs\", \"data\",])\n",
" if (r == 1 and c == 1):\n",
" if ax is None: _,ax = plt.subplots(1, 1, figsize=figsize)\n",
" _show_spectrogram(sg, ax, proper_kwargs, **kwargs)\n",
" plt.title(\"Channel 0 Image 0: {} X {}px\".format(*sg.shape[-2:]))\n",
" else:\n",
Expand Down