- Wrap your tensor as
AudioTensor(tensor, hop_length)
and use it as a regular tensor. - For
ndim > 1
, the shape is(B, T, ...)
, whereB
is the batch size andT
is the number of frames. - For
ndim == 1
, the shape is(B,)
andhop_length = -1
. - Tensors with different
hop_length
will be automatically linearly resampled to the maximum common divisor ofhop_length
s when performing operations. set_hop_length(hop_length)
will resample the tensor to the newhop_length
.reduce_hop_length()
will upsample the tensor tohop_length = 1
.steps
will return the size ofT
in the tensor.truncate(steps)
will truncate the tensor to the givensteps
.unfold(size, step)
return a view of the tensor with a sliding window of sizesize
and stepstep
along theT
dimension.
-
Notifications
You must be signed in to change notification settings - Fork 0
yoyololicon/audiotensor
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published