Comments (2)
@justinsalamon The fundamental problem with having an input_filepath_list
of length less than 2, is that SoX's "combine" mode expects at least 2 files. For example:
sox --combine mix input.wav output.wav
fails, while
sox --combine mix input.wav input.wav output.wav
works fine.
I agree it would be useful to allow having a file list of length one but unfortunately it would require significantly more than an if statement -- to do this, the Combiner object would have to "revert" itself to a Transformer.
The cleanest way I can think of to solve this is to create a third class that wraps the Transformer and Combiner object - if there is 1 input file it behaves like a Transformer and if there are more it behaves like a Combiner. If you want to go this route, I accept pull requests ;)
from pysox.
The cleanest way I can think of to solve this is to create a third class that wraps the Transformer and Combiner object - if there is 1 input file it behaves like a Transformer and if there are more it behaves like a Combiner.
Yes, I mean the combiner already does everything the transformer does, just with the added ability to mix/concatenate several source files before applying a transformation. A single class that can do everything (and hides the logic of choosing a transformer/combiner internally) would be nice to have. No cycles just now for PR, but will add it to the stack.
from pysox.
Related Issues (20)
- Maybe a rounding error?
- SOX failed to get mp3 handling on CentOS
- Is there a faster way to read audio-information from files? HOT 2
- Convert an ulaw byte array to a wav array
- Transformer().build() throws an error for default value of output_path HOT 1
- TypeError: bandreject() got an unexpected keyword argument 'constant_skirt'
- set_output_format can not change the encoding type.
- sox.core.SoxiError: SoXI failed with exit code 1
- Add test support for linux aarch64
- Tagged releases are out of sync with PyPi HOT 7
- Debian 11 pip install error HOT 1
- file info doesn't currently support array input
- Extract a song into multitrack wav files HOT 3
- Specifying raw type to `build_array()` HOT 2
- Extract Mic Feed with pysox HOT 1
- Improve pysox by adding `static-sox` package to auto download sox binaries
- For this stretch factor, the stretch effect has better performance. HOT 1
- Replace deprecated imp module with importlib HOT 2
- sox.file_info.bitrate() Value error
- Pysox tries to import numpy during build-time, only declared as a run-time dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysox.