wangzhibo
2026-10-08 220e4fab27b7f419b3e89e2f2d28ae789aac09d7
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
package xiaozhi.modules.model.dto;
 
import java.io.Serializable;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
 
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "音色信息")
public class VoiceDTO implements Serializable {
    private static final long serialVersionUID = 1L;
 
    @Schema(description = "音色ID")
    private String id;
 
    @Schema(description = "音色名称")
    private String name;
 
    @Schema(description = "音频播放地址")
    private String voiceDemo;
    
    @Schema(description = "语言类型")
    private String languages;
    
    @Schema(description = "是否为克隆音色")
    private Boolean isClone;
 
    // 添加双参数构造函数,保持向后兼容
    public VoiceDTO(String id, String name) {
        this.id = id;
        this.name = name;
        this.voiceDemo = null;
        this.languages = null;
        this.isClone = false; // 默认不是克隆音色
    }
    
    // 添加三参数构造函数,用于普通音色
    public VoiceDTO(String id, String name, String voiceDemo) {
        this.id = id;
        this.name = name;
        this.voiceDemo = voiceDemo;
        this.languages = null;
        this.isClone = false;
    }
 
}