Sesli asistan ses algılamıyor

import KutanSpeech as ks
from datetime import datetime
from playsound import playsound
from gtts import gTTS
import random
import os
import untitled4.py
import time

engine = ks.KutanSpeech()
engine.noice_optimizer()
print("Arka plan sesi optimiz edildi. Dinliyorum...")

def mic_text_doc():
    def callback(text):
        print("Önizleme: "+text)
    try:
        text = engine.wordbyword_listen(callback=callback, language="tr")
        print("Cümle: "+text)
        return text
    except ks.UnknownValueError:
        print("Anlaşılmadı")


def text_to_speak(veri):
    tts = gTTS(veri,lang='tr')
    rand = random.randint(1,100000)
    file = "audio-"+str(rand)+".mp3"
    tts.save(file)
    playsound(file)
    os.remove(file)


while True:
    text = mic_text_doc().lower()
    if "merhaba" in text:
        if "tamamdır" in text:
            text_to_speak("uygulamadan çıkılıyor")
            break
        elif "nasılsın" in text:
            text_to_speak("iyiyim sen nasılsın fatih")
        elif "saat kaç" in text:
            text_to_speak(datetime.now().strftime("%H:%M:%S"))
        elif "çal" in text:
            text_to_speak("çalıyorum")
            untitled4.py.playyoutube(text)
            time.sleep(5)
        elif "arama yap" in text:
            text_to_speak("arama yapıyorum")
            untitled4.py.aramayap(text)
            time.sleep(5)
    elif "uygulamadan çık" in text:
        text_to_speak("uygulamadan çıkılıyor")
        break
    else:
        pass