diff --git a/apps/web/src/pages/voices/components/VoiceModals.tsx b/apps/web/src/pages/voices/components/VoiceModals.tsx index 84b33ed71..e56478ced 100644 --- a/apps/web/src/pages/voices/components/VoiceModals.tsx +++ b/apps/web/src/pages/voices/components/VoiceModals.tsx @@ -2,8 +2,8 @@ * VoiceLibrary 弹窗集合 */ import React from "react" -import type { VoiceClone } from "@/api/voice-clone" -import type { PresetVoiceItem } from "@/api/voices" +import type { ClonedVoiceDisplay, PresetVoiceDisplay, VoiceGender } from "../types" +import type { TtsStatus } from "./TtsModal" import CloneModal from "@/components/voice/CloneModal" import CloneDetailModal from "./CloneDetailModal" import UploadVoiceModal from "./UploadVoiceModal" @@ -16,7 +16,7 @@ export interface VoiceModalsProps { onCloneSuccess: (voice: VoiceClone) => void /* 克隆详情弹窗 */ - detailVoice: VoiceClone | null + detailVoice: ClonedVoiceDisplay | null onDetailClose: () => void onDetailDelete: () => void onDetailRetry: () => void @@ -26,14 +26,14 @@ export interface VoiceModalsProps { uploadOpen: boolean uploadFile: File | null uploadName: string - uploadGender: string + uploadGender: VoiceGender uploadDesc: string - uploadProgress: number + uploadProgress: number | null onUploadClose: () => void onFileSelect: (file: File) => void onFileRemove: () => void onNameChange: (name: string) => void - onGenderChange: (gender: string) => void + onGenderChange: (gender: VoiceGender) => void onDescChange: (desc: string) => void onUpload: () => void @@ -42,10 +42,10 @@ export interface VoiceModalsProps { ttsText: string ttsVoiceId: string ttsSpeed: number - ttsStatus: string - ttsAudioUrl: string + ttsStatus: TtsStatus + ttsAudioUrl: string | null ttsError: string | null - presetVoices: PresetVoiceItem[] + presetVoices: PresetVoiceDisplay[] onTtsClose: () => void onTtsTextChange: (text: string) => void onTtsVoiceChange: (id: string) => void