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

Solution: Import the 'gtts' module

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

import gtts

 

For more information:
Python gtts