Questions
heshanheshanasked 4 months ago
I want to convert text to speech using python. I used ‘gtts’ library, But when i’m run this code i get an this error.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import gTTS
ModuleNotFoundError: No module named 'gTTS'
1

1 Answers

Accepted
codegenlabcodegenlabanswered 4 months ago
To install gTTS, You need to type this command in cmd.
pip install gTTS
OR
python -m pip install gTTS
And to import library use this command,
from gtts import gTTS
1