I am using gtts however when i run it it says:
TypeError 'module' object is not callable
Does anyone know what I should do? If it helps i am using python 3.8.6 on windows many thanks here is the code:
import os
from gtts import gTTS
text_to_read = "Hello my name is Alex. What's your name? "
language = 'en'
slow_audio_speed = False
filename = '1.mp3'
def reading_from_string():
audio_created = gTTS(text=text_to_read, lang=language,
slow=slow_audio_speed)
audio_created.save(filename)
if platform == "linux":
os.system(f'omxplayer --no-keys {filename}')
elif platform == 'win32':
os.system(f'start {filename}')
else:
print("I am not compatible with your device")
exit()
reading_from_string()