-3

I just started using pydub. I am confused that should we download the music to find the path or we need to do something else? Because the example below seems like it already have the file in his terminal or IDE. But I don't see how can I import a music into the IDE.

from pydub import AudioSegment

song = AudioSegment.from_wav("never_gonna_give_you_up.wav")
Molly
  • 25
  • 7

1 Answers1

0

You need to have the never_gonna_give_you_up.wav audio in the same directory as the Python script for this to work. Or if you want to use it from another directory, you need to provide the full path, for example:

song = AudioSegment.from_wav("D:\Music\never_gonna_give_you_up.wav")
Amir Shabani
  • 3,857
  • 6
  • 30
  • 67