https://github.com/baggepinnen/lazywavfiles.jl
Lazily treat wav (audio) files as arrays. Arrays can be distributed over many wav files.
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 5 committers (20.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Lazily treat wav (audio) files as arrays. Arrays can be distributed over many wav files.
Basic Info
- Host: GitHub
- Owner: baggepinnen
- License: mit
- Language: Julia
- Default Branch: master
- Size: 37.1 KB
Statistics
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 3
- Releases: 0
Topics
Metadata Files
README.md
LazyWAVFiles
This package let's you treat a wav-file on disk as an AbstractArray. Access to the data is lazy, i.e., nothing (but size) is read from the file until the array is indexed into. You can also specify a folder containing many wav-files and treat them all as a single large array! This lets you work using files that are too large to fit in memory. Some examples
```julia
using LazyWAVFiles, WAV
Create some files to work with
d = mktempdir() a,b = randn(Float32,10), randn(Float32,10) WAV.wavwrite(a, joinpath(d,"f1.wav"), Fs=8000) WAV.wavwrite(b, joinpath(d,"f2.wav"), Fs=8000)
Indexing into the array loads data from disk
f1 = LazyWAVFile(joinpath(d,"f1.wav")) # This command only reads the size of the file. f1[1] == a[1] f1[1:5] == a[1:5] f1.fs == 8000 size(f1)
We can create an array from all files in a folder
df = DistributedWAVFile(d) # This reads the size from all files. df[1] == a[1] # Indexing works the same df[1:12] == [a; b[1:2]] # We can even index over both arrays df[:] == [a;b] # Or load all files as one long vector df.fs == 8000
size(df) # Other array functions are defined as well length(df)
To work using chunks of the entire distributed array, we can use Iterators.partition
julia> Iterators.partition(df, 2) |> collect
10-element Array{Array{Float32,1},1}:
[0.44920132, -1.1176418]
[-2.0420709, 0.11797007]
[1.4723421, -0.32837275]
[2.3656073, 0.4933495]
[-1.0910473, -0.18483315]
[-0.5574947, -0.46916208]
[0.27721304, -0.39077175]
[-0.05172622, -0.715703]
[0.5821298, 1.6757511]
[1.0726295, 0.23483518]
```
Notes
- Creating a distributed file based on a folder with a really large number of files can take a while due to the size of each audio clip being read from each file. The size information is required in order to have the files appear as one large array. As an example:
julia julia> @time df = DistributedWAVFile("folder_with_21551_files/") 25.518655 seconds (2.47 M allocations: 144.085 MiB, 0.18% gc time) DistributedWAVFile{Float32, 1} with 21551 files, 657735677 total datapoints and samplerate 44100.0
Owner
- Name: Fredrik Bagge Carlson
- Login: baggepinnen
- Kind: user
- Location: Lund, Sweden
- Website: baggepinnen.github.io
- Twitter: baggepinnen
- Repositories: 59
- Profile: https://github.com/baggepinnen
Control systems, system identification, signal processing and machine learning
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 40
- Total Committers: 5
- Avg Commits per committer: 8.0
- Development Distribution Score (DDS): 0.25
Top Committers
| Name | Commits | |
|---|---|---|
| Fredrik Bagge Carlson | b****n@g****m | 30 |
| github-actions[bot] | 4****]@u****m | 6 |
| Too Yuen Min | y****6@g****m | 2 |
| Too Yuen Min | y****o@a****g | 1 |
| Julia TagBot | 5****t@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 7
- Total pull requests: 12
- Average time to close issues: 4 days
- Average time to close pull requests: about 5 hours
- Total issue authors: 5
- Total pull request authors: 4
- Average comments per issue: 3.71
- Average comments per pull request: 1.42
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 7
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mchitre (3)
- youeh1 (1)
- ymtoo (1)
- JuliaTagBot (1)
- baggepinnen (1)
Pull Request Authors
- github-actions[bot] (7)
- ymtoo (3)
- baggepinnen (1)
- JuliaTagBot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
juliahub.com: LazyWAVFiles
Lazily treat wav (audio) files as arrays. Arrays can be distributed over many wav files.
- Documentation: https://docs.juliahub.com/General/LazyWAVFiles/stable/
- License: MIT
-
Latest release: 2.0.1
published about 4 years ago