72.0k views
5 votes
I can't play my recorded voice when i am changed my amplitude and speed from their knobs. this error comes. Please suggest a code to fix this error. I want a graph of the edited recorded voice and i also want to play it after the changes. Please suggest changes to make it work

Edit in question: I am recording a voice in this and play it and getting a graph. Now i want to modify the recorded voice by changing its speed, amplitude and reversing the recorded voice. when the changes are done i want to plot the graph and play the edited voice. I need a code for this functionality when i have to edit the recorded voice. Please see my code it is showing error. Can you suggest a new or modify it so i dont get an error

1 Answer

1 vote

Final answer:

Editing a recorded voice and playing back the modified sound involves digital signal processing, which can be achieved using Python libraries like librosa, matplotlib, and sounddevice. Without the actual code or error message, only a general approach can be suggested, which includes loading the audio file, modifying its amplitude, speed, and possibly reversing it, plotting, and playback.

Step-by-step explanation:

To modify a recorded voice and playback the altered audio, you need to manipulate the sound's waveform data using digital signal processing techniques. The code you require will likely involve reading in the recorded sound, making changes to the amplitude (volume), speed (playback rate), and possibly reversing the sound, then plotting the modified waveform and playing back the sound. Unfortunately, without seeing the specific error message or the code you are using, it's difficult to provide a precise solution. However, I can suggest a general approach.

If you're using Python, the librosa library can be handy for manipulating audio signals. You can adjust the amplitude by simply multiplying the audio signal array by a factor for volume increase or decrease. To change the speed, you might stretch or shrink the audio waveform using the librosa.effects.time_stretch function. For reversing the audio, numpy arrays can be simply reversed. Finally, you can use matplotlib for plotting the waveform and sounddevice or pyaudio for playback.

User Oniel
by
7.4k points