Closed audeerington closed 2 weeks ago
Interesting, thanks for reporting this obscure case ;)
I tried to change the flag of the array directly inside auglib.transform.Function()
with:
signal.setflags(write=True)
but there seems to be a reason for the flag as this fails with
E ValueError: cannot set WRITEABLE flag to True of this array
So I guess we need to avoid to use +=
in all other transforms.
Affected transforms are:
Mix
Tone
WhiteNoiseGaussian
WhiteNoiseUniform
A
np.ndarray
can be flagged as read-only with thewriteable
flag.The example in the documentation using
sox
for pitch shift creates such a signal. This can lead to an error when combining multiple transforms, for example:which leads to the error
This could probably be solved by not using
+=
butsignal = signal +
for all transforms.