neuralset.extractors.audio.SpeechEnvelope

class neuralset.extractors.audio.SpeechEnvelope(*, event_types: str | tuple[str, ...] = 'Audio', aggregation: Literal['single', 'sum', 'mean', 'first', 'middle', 'last', 'cat', 'stack', 'trigger'] = 'single', allow_missing: bool = False, frequency: Literal['native'] | float = 'native', norm_audio: bool = True, infra: MapInfra = MapInfra(folder=None, cluster=None, logs='{folder}/logs/{user}/%j', job_name=None, timeout_min=25, nodes=1, tasks_per_node=1, cpus_per_task=8, gpus_per_node=1, mem_gb=None, max_pickle_size_gb=None, slurm_constraint=None, slurm_partition=None, slurm_account=None, slurm_qos=None, slurm_use_srun=False, slurm_additional_parameters=None, conda_env=None, workdir=None, permissions=511, version='v5', keep_in_ram=True, max_jobs=128, min_samples_per_job=4096, forbid_single_item_computation=False, mode='cached'), lowpass_freq: float | None = 30.0, filter_order: int = 4)[source][source]

Extract the acoustic amplitude envelope from audio waveforms.

The envelope is computed by taking the absolute value of the Hilbert transform of the audio signal, optionally followed by lowpass filtering to smooth the envelope.

Parameters:
  • lowpass_freq (float or None, default=30.0) – Cutoff frequency (Hz) for lowpass filtering the envelope. If None, no lowpass filtering is applied.

  • filter_order (int, default=4) – Order of the Butterworth lowpass filter.