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