How to Solve NameError: name 'gTTS' is not defined -- gtts

Solution: Import the 'gTTS' module

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

from gtts import gTTS

 

For more information:
Python gtts gTTS