-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
155 lines (141 loc) · 3.14 KB
/
types.ts
File metadata and controls
155 lines (141 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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;
ditModel?: 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;
enhance?: boolean;
audioFormat: 'wav' | 'mp3';
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' | 'models' | 'profile' | 'song' | 'playlist' | 'search' | 'news' | 'debug';