Speech to Text Conversion
pyttsx3 is a text-to-speech conversion library in Python, pyttx3 engine is initialized and used for text to speech conversion.
'''Initialize the pyttx3 engine for speech recognization'''
engine = pyttsx3.init()
This is the rate at which Aryan or Aryan speaks the Text, Default being 200. Currently 150 is assigned as the rate to have clear voice.
Voice is assigned for the respective AI Friend (Aryan or Arya), Also Voice assignment is based on Operating System. Different voice are assigned if Aryan is running on Windows or Linux.
if aifriend == "Arya":
#For Linux Female voice is set to english_rp+f3
#For Windows Female voice is set to Zira
#For Linux male voice is set to english_rp+m1
#For Windows Male voice is set to David
Engine is executed to convert text into speech for the given text (command). Snippet below.