-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change Audiosegment to ndarray for librosa to add effect #289
Comments
Have you tried using ‘AudioSegment(…).get_array_of_samples()`? |
You can get "array.array"object by using and if you want to get numpy.ndarray, try: |
the type of data x is int and |x| may more than 1, but the type of librosa is float32 and less than 1. |
And how to change back to AudioSegment? |
@mattc-eostar That's covered in the docs: from pydub import AudioSegment
sound = AudioSegment.from_file("sound1.wav")
samples = sound.get_array_of_samples()
# then modify samples...
new_sound = sound._spawn(samples) |
Ah, perfect. Thank you!
|
I wonder how to change Audiosegment to float32 ndarray for librosa to manipulate.
The text was updated successfully, but these errors were encountered: