pulsatrix
Loading...
Searching...
No Matches
audio_transforms.hpp
Go to the documentation of this file.
1
5#pragma once
6
9
10namespace pulsatrix {
11
24public:
25 ResampleTransform(int target_sample_rate, int source_sample_rate, DeviceBackend* backend)
26 : target_sample_rate_(target_sample_rate), source_sample_rate_(source_sample_rate), backend_(backend) {}
27
28 [[nodiscard]] Sample apply(Sample sample) const override;
29
30private:
31 int target_sample_rate_;
32 int source_sample_rate_;
33 DeviceBackend* backend_;
34};
35
36} // namespace pulsatrix
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:219
Resamples a waveform (sample.fields[0], shape (1, channels, num_samples) – WavReader's/AudioFolderDat...
Definition audio_transforms.hpp:23
ResampleTransform(int target_sample_rate, int source_sample_rate, DeviceBackend *backend)
Definition audio_transforms.hpp:25
Sample apply(Sample sample) const override
Applies this transform to a sample.
A single sample-level preprocessing step (normalize, augment, tokenize, ...).
Definition transform.hpp:20
Abstract interface isolating vendor-specific memory/compute operations from Tensor/ComputationGraph.
Definition acquisition_functions.hpp:16
One dataset sample: an ordered list of Tensor fields (e.g. {features, label} or {image,...
Definition dataset.hpp:19
Sample-level preprocessing abstraction – Transform, Compose, TransformDataset.