AttributeError: 'array.array' object has no attribute 'ndim'

17 Views Asked by At

I installed rubberband-cli in ubuntu using this command

sudo apt-get update -y sudo apt-get install -y rubberband-cli

Now I'm getting this error, Any solutions?

Traceback (most recent call last): File "/home/satya/satya-space/personal_projects/voice-speeding/speeder.py", line 31, in <module> transition_start = pyrb.time_stretch(combined_audio[:transition_duration].get_array_of_samples(), combined_audio[:transition_duration].frame_rate, end_speed - start_speed) File "/home/satya/.local/lib/python3.10/site-packages/pyrubberband/pyrb.py", line 142, in time_stretch return __rubberband(y, sr, **rbargs) File "/home/satya/.local/lib/python3.10/site-packages/pyrubberband/pyrb.py", line 80, in __rubberband if y.ndim == 1: AttributeError: 'array.array' object has no attribute 'ndim'

Is there any other way to install rubberband-cli or pyrubberband

I'm not getting enough solutions online.

1

There are 1 best solutions below

0
Satya Dewangan On

Okay, I fixed the code by adding combined_audio[:transition_duration].get_array_of_samples() into np.array()