pub struct AudioBatch {
pub samples: Tensor,
pub mask: Tensor,
pub lengths: Vec<usize>,
pub sample_rate: u32,
}Expand description
Zero-padded equal-rate waveform batch.
Fields§
§samples: Tensor[batch,channels,max_frames] Float/Double audio.
mask: TensorTrue for real frames, shape [batch,max_frames].
lengths: Vec<usize>Original frames per sample.
sample_rate: u32Common frame rate.
Trait Implementations§
Source§impl Debug for AudioBatch
impl Debug for AudioBatch
Source§impl MemoryFootprint for AudioBatch
impl MemoryFootprint for AudioBatch
Source§fn resident_bytes(&self) -> usize
fn resident_bytes(&self) -> usize
Returns the conservative logical payload size in bytes.
Source§impl PinMemory for AudioBatch
impl PinMemory for AudioBatch
Source§fn pin_memory(self, d: Device) -> Result<Self>
fn pin_memory(self, d: Device) -> Result<Self>
Pins this value for the requested accelerator.
Auto Trait Implementations§
impl !Sync for AudioBatch
impl Forget for AudioBatch
impl Freeze for AudioBatch
impl RefUnwindSafe for AudioBatch
impl Send for AudioBatch
impl Unpin for AudioBatch
impl UnsafeUnpin for AudioBatch
impl UnwindSafe for AudioBatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more