Files
ace-step-ui/types.ts
T
fspecii 325046eaf2 Apply i18n to all components, add collapsible sidebar, playback speed control, inline title editing, and ConfirmDialog for deletions
Phase 4: i18n all 15 components from PR #19. Sidebar gains collapse/expand
toggle. Player gets playback speed selector (0.25x-2.0x) fixing bug B1
(hardcoded Chinese '正常'). SongList adds inline title editing and model
version badge. Delete actions now use ConfirmDialog instead of
window.confirm. Volume persisted to localStorage. Training nav item
deferred to Phase 7.
2026-02-08 18:35:09 +02:00

154 lines
3.1 KiB
TypeScript

export interface Song {
id: string;
title: string;
lyrics: string;
style: string;
coverUrl: string;
duration: string;
createdAt: Date;
isGenerating?: boolean;
queuePosition?: number; // Position in queue (undefined = actively generating, number = waiting in queue)
progress?: number;
stage?: string;
generationParams?: any;
tags: string[];
audioUrl?: string;
isPublic?: boolean;
likeCount?: number;
viewCount?: number;
userId?: string;
creator?: string;
creator_avatar?: string;
ditModel?: string;
}
export interface Playlist {
id: string;
name: string;
description?: string;
coverUrl?: string;
cover_url?: string;
songIds?: string[];
isPublic?: boolean;
is_public?: boolean;
user_id?: string;
creator?: string;
created_at?: string;
song_count?: number;
songs?: any[];
}
export interface Comment {
id: string;
songId: string;
userId: string;
username: string;
content: string;
createdAt: Date;
}
export interface GenerationParams {
// Mode
customMode: boolean;
// Simple Mode
songDescription?: string;
// Custom Mode
prompt: string;
lyrics: string;
style: string;
title: string;
// Common
instrumental: boolean;
vocalLanguage: string;
// Music Parameters
bpm: number;
keyScale: string;
timeSignature: string;
duration: number;
// Generation Settings
inferenceSteps: number;
guidanceScale: number;
batchSize: number;
randomSeed: boolean;
seed: number;
thinking: boolean;
audioFormat: 'mp3' | 'flac';
inferMethod: 'ode' | 'sde';
shift: number;
// LM Parameters
lmTemperature: number;
lmCfgScale: number;
lmTopK: number;
lmTopP: number;
lmNegativePrompt: string;
lmBackend?: 'pt' | 'vllm';
lmModel?: string;
// Expert Parameters
referenceAudioUrl?: string;
sourceAudioUrl?: string;
referenceAudioTitle?: string;
sourceAudioTitle?: string;
audioCodes?: string;
repaintingStart?: number;
repaintingEnd?: number;
instruction?: string;
audioCoverStrength?: number;
taskType?: string;
useAdg?: boolean;
cfgIntervalStart?: number;
cfgIntervalEnd?: number;
customTimesteps?: string;
useCotMetas?: boolean;
useCotCaption?: boolean;
useCotLanguage?: boolean;
autogen?: boolean;
constrainedDecodingDebug?: boolean;
allowLmBatch?: boolean;
getScores?: boolean;
getLrc?: boolean;
scoreScale?: number;
lmBatchChunkSize?: number;
trackName?: string;
completeTrackClasses?: string[];
isFormatCaption?: boolean;
}
export interface PlayerState {
currentSong: Song | null;
isPlaying: boolean;
progress: number;
volume: number;
}
export interface User {
id: string;
username: string;
createdAt: Date;
followerCount?: number;
followingCount?: number;
isFollowing?: boolean;
isAdmin?: boolean;
avatar_url?: string;
banner_url?: string;
}
export interface UserProfile {
user: User;
publicSongs: Song[];
publicPlaylists: Playlist[];
stats: {
totalSongs: number;
totalLikes: number;
};
}
// Simplified views for ACE-Step UI
export type View = 'create' | 'library' | 'profile' | 'song' | 'playlist' | 'search';