package com.fs.aiSoundReplication.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "voice.clone.tts")
public class TtsConfig {
    // HTTP TTS接口地址
    private String httpUrl = "https://openspeech.bytedance.com/api/v1/tts";

    // 默认参数
    private String defaultFormat = "mp3";
    private Integer defaultSampleRate = 24000;
    private Integer defaultSpeed = 1;
    private Integer defaultVolume = 10;
    private Integer defaultPitch = 10;
    private String defaultCluster = "volcano_icl";

    // 文本长度限制
    private Integer maxTextLength = 500; // 最大文本长度

    // 重试配置
    private Integer maxRetryTimes = 3;
    private Long retryInterval = 2000L;

    // 音频保存路径
    private String audioSavePath = "./audio/";

    // 是否自动保存音频文件
    private Boolean autoSave = true;
}
