emvoice.frames
Store audio and voice feature frames.
Module Contents
Classes
Create and store signal frames. |
- class emvoice.frames.BaseFrames(frames: numpy.ndarray, sr: int, frame_len: int, hop_len: int, center: bool = True, pad_mode: str = 'constant')[source]
Create and store signal frames.
A frame is an (overlapping, padded) slice of a signal for which higher-order features can be computed.
- Parameters:
frames (numpy.ndarray) – Signal frames. The first dimension should be the number of frames.
sr (int) – Sampling rate.
frame_len (int) – Number of samples per frame.
hop_len (int) – Number of samples between frame starting points.
center (bool, default=True) – Whether the signal has been centered and padded before framing.
pad_mode (str, default='constant') – How the signal has been padded before framing. See
numpy.pad(). Uses the default value 0 for ‘constant’ padding.
See also
librosa.util.frame- property idx: numpy.ndarray[source]
Frame indices (read-only).
- property ts: numpy.ndarray[source]
Frame timestamps (read-only).
- classmethod from_signal(sig_obj: emvoice.signal.BaseSignal, frame_len: int, hop_len: Optional[int] = None, center: bool = True, pad_mode: str = 'constant')[source]
Create frames from a signal.
- Parameters:
sig_obj (BaseSignal) – Signal object.
frame_len (int) – Number of samples per frame.
hop_len (int, optional, default=None) – Number of samples between frame starting points. If None, uses frame_len // 4.
center (bool, default=True) – Whether to center the frames and apply padding.
pad_mode (str, default='constant') – How the signal is padded before framing. See
numpy.pad(). Uses the default value 0 for ‘constant’ padding. Ignored if center=False.