Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoyololicon/audiotensor
https://github.com/yoyololicon/audiotensor
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/yoyololicon/audiotensor
- Owner: yoyololicon
- Created: 2024-01-31T14:52:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-25T07:47:50.000Z (7 months ago)
- Last Synced: 2024-05-01T18:53:11.694Z (7 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AudioTensor
- Wrap your tensor as `AudioTensor(tensor, hop_length)` and use it as a regular tensor.
- For `ndim > 1`, the shape is `(B, T, ...)`, where `B` is the batch size and `T` is the number of frames.
- For `ndim == 1`, the shape is `(B,)` and `hop_length = -1`.
- Tensors with different `hop_length` will be automatically linearly resampled to the maximum common divisor of `hop_length`s when performing operations.
- `set_hop_length(hop_length)` will resample the tensor to the new `hop_length`.
- `reduce_hop_length()` will upsample the tensor to `hop_length = 1`.
- `steps` will return the size of `T` in the tensor.
- `truncate(steps)` will truncate the tensor to the given `steps`.
- `unfold(size, step)` return a view of the tensor with a sliding window of size `size` and step `step` along the `T` dimension.