virtual assistant using 4 lines of Python code
If you don't have friend to talk with you. Don't worry Python can help you ,so if you need someone to take with you . Python is there and that's executing because you can create something that can talk with you by writing just 4 lines of code .
For that first we go to browser and search Python text to speech
And copy that
Past it in your pip and install it
And just write 4 lines of code
import pyttsx3
friend = pyttsx3.init()
friend.say('you are amazing ')
friend.runAndWait()
or import pyttsx3
friend = pyttsx3.init()
talk = input('say something')
friend.say(talk)
friend.runAndWait()
0 Comments