Skip to content

Commit dc48fcb

Browse files
feat: whisper triangular speaker logo, generate colored gradient logo
1 parent fbcbe55 commit dc48fcb

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

ov_cli/generate.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,25 @@ def run_generate(ctx, width=_DEFAULT_WIDTH, height=_DEFAULT_HEIGHT,
9292
os.makedirs(save_dir, exist_ok=True)
9393
history = []
9494

95+
_logo_lines = [
96+
' ██████╗ ██╗ ██╗ ██████╗██╗ ██╗',
97+
' ██╔═══██╗██║ ██║ ██╔════╝██║ ██║',
98+
' ██║ ██║██║ ██║ ██║ ██║ ██║',
99+
' ██║ ██║╚██╗ ██╔╝ ██║ ██║ ██║',
100+
' ╚██████╔╝ ╚████╔╝ ╚██████╗███████╗██║',
101+
' ╚═════╝ ╚═══╝ ╚═════╝╚══════╝╚═╝',
102+
]
103+
_pool = [17, 23, 30, 148, 226, 208, 218, 224]
95104
print()
96-
print(" ▄█▀▀▀█▄░ ▄█ █▄░ ▄██████▄ ██ ██░")
97-
print(" ██░ ██░ ██░ ██░ ██░ ██░ ██░ ")
98-
print(" ██░ ██░ ██░ ██░ ██░ ██░ ██ ██░")
99-
print(" ██▄░ ▄██░ ▀██▄ ▄██▀░ ██░ ██░ ██░")
100-
print(" ▀███████▀░ ▀█████▀░ ▀███████▄░ ████████░ ██░")
101-
print(" ▀▀▀▀▀ ▀▀▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀ ▀▀")
105+
for i, line in enumerate(_logo_lines):
106+
n = len(line)
107+
seg = n // 4
108+
parts = [line[j:j+seg] for j in range(0, n, seg)]
109+
colored = ''
110+
for k, p in enumerate(parts):
111+
ci = min(i + k, len(_pool) - 1)
112+
colored += f'\033[38;5;{_pool[ci]}m{p}\033[0m'
113+
print(colored)
102114
print("=" * 50)
103115
print(" ov-cli " + TR("文生图终端", "Image Generation"))
104116
print(f" {TR('设备', 'Device')}: {ctx['device']} | OpenVINO")

ov_cli/whisper.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ def run_whisper(ctx, lang=None):
101101
current_lang = lang
102102

103103
print()
104-
print(" ▄█▀▀▀▄█▀▀▀▀▄ ▄ ▄ ▄▀▀▀▄ ▄▀▀▀▄")
105-
print(" █ █ █ █ █ █ █ █ █")
106-
print(" █ █ █ █ █ █ █ █ █")
107-
print(" ▀▄▄▄▀ ▀▄▄▄▄▀ ▀▄▄▀ ▀▄▄▄▀ ▀▄▄▄▀")
104+
print(" ██████╗ ██╗ ██╗ ██████╗██╗ ██╗ ")
105+
print(" ██╔═══██╗██║ ██║ █ ██╔════╝██║ ██║ ")
106+
print(" █ ██║ ██║██║ ██║███ ██║ ██║ ██║█")
107+
print(" ███ ██║ ██║╚██╗ ██╔╝███ ██║ ██║ ██║███")
108+
print("██████ ╚██████╔╝ ╚████╔╝█████╚██████╗███████╗██║██████ ")
109+
print(" ╚═════╝ ╚═══╝ ╚═════╝╚══════╝╚═╝")
108110
print("=" * 50)
109111
print(" ov-cli " + TR("语音转文字", "Speech to Text"))
110112
print(f" {TR('设备', 'Device')}: {ctx['device']} | OpenVINO")

0 commit comments

Comments
 (0)