Skip to content

Commit f02b582

Browse files
committed
use full commets.
1 parent ffd6c3c commit f02b582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

voice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# Define the text you want to convert to speech
66
text = "Hello! This is a sample text to convert to speech."
77

8-
# Exception Handaled
8+
# Exception Handaled.
99
try:
1010
# Create a gTTS object
1111
tts = gTTS(text=text, lang="en")
1212

13-
# Save the audio file
13+
# Save the audio file in mp3 format
1414
tts.save("output.mp3")
1515

16-
# Play the audio file
16+
# Play the audio file from system
1717
os.system("start output.mp3")
1818
except Exception as e:
1919
print(Fore.RED, e, Fore.RESET)

0 commit comments

Comments
 (0)