diff --git a/apps/web/src/pages/voices/components/TtsModal.tsx b/apps/web/src/pages/voices/components/TtsModal.tsx index 0bfbab43e..1859489b3 100755 --- a/apps/web/src/pages/voices/components/TtsModal.tsx +++ b/apps/web/src/pages/voices/components/TtsModal.tsx @@ -1,27 +1,12 @@ import React from "react" -import { RobotOutlined } from "@ant-design/icons" -import { Modal, message } from "antd" -import { type PresetVoiceDisplay } from "@/pages/voices/types" -import { genderLabel } from "@/pages/voices/utils/format" - -export type TtsStatus = "idle" | "synthesizing" | "done" | "error" - -export interface TtsModalProps { - open: boolean - ttsText: string - ttsVoiceId: string - ttsSpeed: number - ttsStatus: TtsStatus - ttsAudioUrl: string | null - ttsError: string | null - presetVoices: PresetVoiceDisplay[] - onClose: () => void - onTextChange: (text: string) => void - onVoiceChange: (voiceId: string) => void - onSpeedChange: (speed: number) => void - onSynthesize: () => void - onSave: () => void -} +import { Modal } from "antd" +import { type TtsModalProps, type TtsStatus } from "./tts-modal/types" +import TextInputSection from "./tts-modal/TextInputSection" +import VoiceSelector from "./tts-modal/VoiceSelector" +import SpeedControl from "./tts-modal/SpeedControl" +import SynthesizeButton from "./tts-modal/SynthesizeButton" +import ErrorAlert from "./tts-modal/ErrorAlert" +import ResultPanel from "./tts-modal/ResultPanel" /** AI 配音弹窗 */ const TtsModal: React.FC = ({ @@ -50,205 +35,13 @@ const TtsModal: React.FC = ({ padding: "8px 0", }} > - {/* 文本输入 */} -
-
- 输入文本 -
-