Comments (6)
Hi @RickyWang111!
When opening an issue, it's much more useful to include context - what you were doing when the error occurred, what your code looks like, and so on.
This error is thrown when attempting to write audio to a file (with pedalboard.io.AudioFile
). Data being passed to .write()
is expected to be either a one-dimensional array (i.e.: of shape (num_samples,)
) or a two-dimensional array (of shape (num_channels, num_samples)
or (num_samples, num_channels)
).
This error indicates that either you're passing in multi-channel audio when the audio file was opened with num_channels=1
(the default), or you're passing an unexpected shape of data that doesn't look like one of the shapes above. I'll make this error message clearer in a future release.
tl;dr: try setting num_channels=2
when you open the audio file.
from pedalboard.
I just copied the first example "quick start" and ran it, and then such an error occurred.
from pedalboard import Pedalboard, Chorus, Reverb
from pedalboard.io import AudioFile
with AudioFile('demo.mp3', 'r') as f:
audio = f.read(f.frames)
samplerate = f.samplerate
board = Pedalboard([Chorus(), Reverb(room_size=0.25)])
effected = board(audio, samplerate)
with AudioFile('processed-output.wav', 'w', samplerate) as f:
f.write(effected)
Traceback (most recent call last):
File "G:\work\jy_music2\s1.py", line 18, in
f.write(effected)
RuntimeError: Unable to determine shape of audio input! Expected 1-channel audio.
Could you tell me where is the Full documentation,I can't find anywhere. I am a novice.thank you!
from pedalboard.
My file 'demo.mp3'. It is a correct file, dual channel, playing without any problem.
from pedalboard.
and my python is 3.10.2
from pedalboard.
Thanks for the context - it seems that the example code in the readme assumed that the input audio was mono. I've just updated the example to explicitly handle stereo audio files, but I'll also leave this bug open to make this more intuitive.
from pedalboard.
Thank you very much. I can run it now
from pedalboard.
Related Issues (20)
- ML Examples with tf.data HOT 1
- plugin.process() takes 50x longer when synth produces no output. Process timeout? HOT 1
- Parameter Values HOT 4
- Using Pitch shift generates empty audio file HOT 3
- External VST3s not affecting live audio HOT 3
- Add Support for VST2 Plugins HOT 2
- Add Support for CLAP Plugins
- Error loading VST in Python 3.11.5 HOT 5
- Input device names truncated, along with stuttery audio HOT 2
- Pedalboard Pluginary: easier access to VST3/AU plugins
- Valhalla Supermassive - Whoosh noise at beginning of output
- Cannot load .fxp file for Serum HOT 2
- Is threading supported for `VST3Plugin` instances? HOT 2
- Need help with parameters for improving TTS generated audio
- Does WriteableAudioFile handles creating a WAV file with the standard header? HOT 2
- Unable to load VST3 when running through CircleCI HOT 1
- Limiter Plugin seems also to normalize? HOT 1
- is there a way to overplay 2 audio together using pedalboard HOT 1
- Actual resampled audio length != expected resampled audio length
- Audio Stream HOT 2
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 pedalboard.