How to Solve NameError: name 'play' is not defined -- pydub

Solution: Import the 'play' module

To Solve the error, add the following line to the top of your code.

from pydub.playback import play

 

For more information:
Python pydub play