From 112884a504666f7d927f12e5454edc34e50b2680 Mon Sep 17 00:00:00 2001 From: yuzhiran Date: Sat, 13 Jun 2026 11:04:52 +0800 Subject: [PATCH] fix: PNG face avatar + whisper ASR --- backend/src/modules/tts/tts.controller.ts | 3 +- zhiyin-app/src/components/digital-human.vue | 212 +++----------------- zhiyin-app/src/manifest.json | 4 +- zhiyin-app/static/ai-face.png | Bin 0 -> 4231 bytes zhiyin-app/static/ai-face.svg | 1 + zhiyin-app/static/digital-human-face.svg | 83 ++++++++ 6 files changed, 120 insertions(+), 183 deletions(-) create mode 100644 zhiyin-app/static/ai-face.png create mode 100644 zhiyin-app/static/ai-face.svg create mode 100644 zhiyin-app/static/digital-human-face.svg diff --git a/backend/src/modules/tts/tts.controller.ts b/backend/src/modules/tts/tts.controller.ts index cebcd67..2dfaef4 100644 --- a/backend/src/modules/tts/tts.controller.ts +++ b/backend/src/modules/tts/tts.controller.ts @@ -59,7 +59,8 @@ export class TtsController { const parsed = JSON.parse(result) if (parsed.text) return { text: parsed.text.trim() } } - const whisperResult = execSync(`whisper "${dest}" --language zh --output_format txt 2>/dev/null`, { encoding: 'utf8', timeout: 60000 }) + const whisperBin = '/root/.local/bin/whisper' + const whisperResult = execSync(`${whisperBin} "${dest}" --language zh --output_format txt 2>/dev/null`, { encoding: 'utf8', timeout: 60000 }) if (whisperResult && whisperResult.trim()) { return { text: whisperResult.trim() } } diff --git a/zhiyin-app/src/components/digital-human.vue b/zhiyin-app/src/components/digital-human.vue index 20cedd2..29bf81f 100644 --- a/zhiyin-app/src/components/digital-human.vue +++ b/zhiyin-app/src/components/digital-human.vue @@ -2,24 +2,8 @@ - - - - - - - - - - - - - - - - - - + + AI 面试官 @@ -33,7 +17,7 @@