text
stringlengths
0
5.54k
n_fft: int = 2048
hop_length: int = 512
top_db: int = 80
n_iter: int = 32
)
Parameters
x_res (int) — x resolution of spectrogram (time)
y_res (int) — y resolution of spectrogram (frequency bins)
sample_rate (int) — sample rate of audio
n_fft (int) — number of Fast Fourier Transforms
hop_length (int) — hop length (a higher number is recommended for lower than 256 y_res)
top_db (int) — loudest in decibels
n_iter (int) — number of iterations for Griffin Linn mel inversion
audio_slice_to_image
<
source
>
(
slice: int
)
→
PIL Image
Parameters
slice (int) — slice number of audio to convert (out of get_number_of_slices())
Returns
PIL Image
grayscale image of x_res x y_res
Convert slice of audio to spectrogram.
get_audio_slice
<
source
>
(
slice: int = 0
)
→
np.ndarray
Parameters
slice (int) — slice number of audio (out of get_number_of_slices())
Returns
np.ndarray
audio as numpy array
Get slice of audio.
get_number_of_slices
<
source
>
(
)
→
int
Returns