feat: 将视频转写重构为纯文字异步语音识别

This commit is contained in:
2026-10-03 21:58:06 +08:00
parent 040273586b
commit 6f0e38054b
34 changed files with 2283 additions and 1771 deletions
@@ -36,7 +36,7 @@ export function TranscriptPanel({
});
};
if (!transcript?.speech_detected || !transcript.transcript?.length) {
if (!transcript?.transcript?.length) {
return (
<div
className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm"
@@ -60,7 +60,7 @@ export function TranscriptPanel({
{/* 内容 */}
<div className="p-8 text-center text-white/60">
<p>该视频暂无语音转录内容</p>
<p>{transcript ? "未识别到文字" : "该视频尚未转写"}</p>
</div>
</div>
</div>
@@ -80,11 +80,7 @@ export function TranscriptPanel({
<div className="flex items-center justify-between p-4 border-b border-white/10 flex-shrink-0">
<div>
<h2 className="text-lg font-semibold text-white">语音转录</h2>
{transcript.language && (
<p className="text-xs text-white/50 mt-1">
语言: {transcript.language}
</p>
)}
</div>
<div className="flex items-center gap-2">
<button