| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from time import sleep
- from DynLoader import DynLoaderMod as dyn
- from VoicePlay import Voice as speach
- from Stats import Stats
- from Jessi import Text as textauswahl
- from PicoVoice import PicoVoice
- import os
- import sys
- import colorama
- from colorama import Fore, Back, Style
- from listener import Lis
- def WeakWord(index,weakword):
- print(f"Weakword {Fore.GREEN}[{index}]{Fore.CYAN}{weakword}{Style.RESET_ALL}")
-
- if __name__ == "__main__":
- os.system('color')
- print(f"Start {Fore.GREEN}Application{Style.RESET_ALL}")
- print(f"Init {Fore.GREEN}Mods{Style.RESET_ALL}")
- mod = dyn("mods/", "on")
- print(f"Init {Fore.GREEN}Stats{Style.RESET_ALL}")
- stats:Stats = Stats.getInstance()
- print(f"Init {Fore.GREEN}Speech{Style.RESET_ALL}")
- speach.getInstance().Say(".")
- mod.execute("PlaySound", "welcome.wav", False)
- print("Sound playing...")
-
- pico:PicoVoice = PicoVoice.getInstance()
- PicoVoice.show_audio_devices()
- pico.RegisterOnWeakWord(WeakWord)
- pico.start()
- Lis.Start()
- sleep(60)
- Lis.Stop()
- try:
- inp=""
- while inp!="qqq" and inp!="quit" and inp!="q":
- inp=input()
- except (KeyboardInterrupt, SystemExit):
- pass
- print("Exit")
|