You've already forked Irene-Voice-Assistant
mirror of
https://github.com/janvarev/Irene-Voice-Assistant.git
synced 2025-12-05 23:08:23 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
from fastapi import FastAPI, HTTPException
|
from fastapi import FastAPI, HTTPException
|
||||||
import uvicorn
|
import uvicorn
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
|
from termcolor import cprint
|
||||||
|
|
||||||
#from pydantic import BaseModel
|
#from pydantic import BaseModel
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@ def core_update_timers_http(runReq=True):
|
|||||||
@app.on_event("shutdown")
|
@app.on_event("shutdown")
|
||||||
def app_shutdown():
|
def app_shutdown():
|
||||||
global is_running
|
global is_running
|
||||||
print("\033[93m{}\033[00m" .format("Ctrl-C pressed, exiting Irene."))
|
cprint("Ctrl-C pressed, exiting Irene.", "yellow")
|
||||||
is_running = False
|
is_running = False
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
13
vacore.py
13
vacore.py
@@ -2,6 +2,7 @@ import os
|
|||||||
import traceback
|
import traceback
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
from termcolor import colored, cprint
|
||||||
import time
|
import time
|
||||||
from threading import Timer
|
from threading import Timer
|
||||||
|
|
||||||
@@ -404,18 +405,16 @@ class VACore(JaaCore):
|
|||||||
# ----------- display info functions ------
|
# ----------- display info functions ------
|
||||||
|
|
||||||
def display_init_info(self):
|
def display_init_info(self):
|
||||||
if self.isOnline:
|
cprint("VoiceAssistantCore v{0}:".format(version), "blue", end=' ')
|
||||||
print("VoiceAssistantCore v{0}: run online".format(version))
|
print("run ONLINE" if self.isOnline else "run OFFLINE")
|
||||||
else:
|
|
||||||
print("VoiceAssistantCore v{0}: run OFFLINE".format(version))
|
|
||||||
|
|
||||||
self.format_print_key_list("TTS engines", self.ttss.keys())
|
self.format_print_key_list("TTS engines", self.ttss.keys())
|
||||||
self.format_print_key_list("Assistant names", self.voiceAssNames)
|
self.format_print_key_list("Assistant names", self.voiceAssNames)
|
||||||
|
|
||||||
print("\033[34m{}\033[00m".format("Commands list: "+"#"*65))
|
cprint("Commands list: "+"#"*65, "blue")
|
||||||
for plugin in self.plugin_commands:
|
for plugin in self.plugin_commands:
|
||||||
self.format_print_key_list(plugin, self.plugin_commands[plugin])
|
self.format_print_key_list(plugin, self.plugin_commands[plugin])
|
||||||
print("\033[34m{}\033[00m".format("#"*80))
|
cprint("#"*80, "blue")
|
||||||
|
|
||||||
def format_print_key_list(self, key:str, value:list):
|
def format_print_key_list(self, key:str, value:list):
|
||||||
print("\033[34m{}: \033[00m".format(key)+", ".join(value))
|
print(colored(key+": ", "blue")+", ".join(value))
|
||||||
|
|||||||
Reference in New Issue
Block a user