I would like to change the volume of a music track but only for specific time ranges. For example, I would like to apply a gain of -6dB between 0s to 1s ; and between 5s to 6s and leave the rest of the soundtrack untouched.
I have seen that I can access the data of the signal with
AudioSegment(…).get_array_of_samples()
I tried to convert it to an numpy.array
in order to divide it with a float (100.0) and getting it back with AudioSegment(…)._spawn()
but the result is not meeting my expectations... (I even felt it increased the volume)
If required, I can provide a MWE but before, I wanted to verify my idea with some experienced people.
Best regards