AI assistant BUG

Can you please test this code and help me I am unable to use it

import pyttsx3 
import speech_recognition as sr #
import datetime
import wikipedia 
import webbrowser

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)

def speak(audio):

def wishMe():
    hour = int(
    if hour>=0 and hour<12:
        speak("Good Morning!")

    elif hour>=12 and hour<18:
        speak("Good Afternoon!")   

        speak("Good Evening!")  

    speak("I am Marvel Sir. Please tell me how may I help you")       

def takeCommand():

    r = sr.Recognizer()
    with sr.Microphone() as source:
        r.pause_threshold = 1
        audio = r.listen(source)

        query = r.recognize_google(audio, language='en-in')
        print(f"User said: {query}\n")

    except Exception as e:
        return "None"
    return query

if __name__ == "__main__":
    while True:
        query = takeCommand().lower()

        if 'wikipedia' in query:
            speak('Searching Wikipedia...')
            query = query.replace("wikipedia", "")
            results = wikipedia.summary(query, sentences=2)
            speak("According to Wikipedia")

        elif 'the time' in query:
            strTime ="%H:%M:%S")    
            speak(f"Sir, the time is {strTime}")

        elif 'open youtube' in query:

        elif 'open google' in query:

what should it do? please say something about the code

actually i want to create AI assistant like jarvis but when i run this code i get error which i have mentioned in the image can u please tell me where i am doing wrong
with corrected code

I edited your post to move the screenshot outside the block of code, now the screenshot is visibl.e