text
stringlengths
0
5.54k
int
number of spectograms audio can be sliced into
Get number of slices in audio.
get_sample_rate
<
source
>
(
)
→
int
Returns
int
sample rate of audio
Get sample rate:
image_to_audio
<
source
>
(
image: Image
)
→
audio (np.ndarray)
Parameters
image (PIL Image) — x_res x y_res grayscale image
Returns
audio (np.ndarray)
raw audio
Converts spectrogram to audio.
load_audio
<
source
>
(
audio_file: str = None
raw_audio: ndarray = None
)
Parameters
audio_file (str) — must be a file on disk due to Librosa limitation or
raw_audio (np.ndarray) — audio as numpy array
Load audio.
set_resolution
<
source
>
(
x_res: int
y_res: int
)
Parameters
x_res (int) — x resolution of spectrogram (time)
y_res (int) — y resolution of spectrogram (frequency bins)