文字转语音
This commit is contained in:
43
src/main/java/com/rj/config/SiliconFlowConfig.java
Normal file
43
src/main/java/com/rj/config/SiliconFlowConfig.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.rj.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* SiliconFlow API 配置类
|
||||
*
|
||||
* @author rj
|
||||
* @date 2025-01-02
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "siliconflow")
|
||||
public class SiliconFlowConfig {
|
||||
|
||||
/**
|
||||
* SiliconFlow API 基础URL
|
||||
*/
|
||||
private String baseUrl = "https://api.siliconflow.cn/v1";
|
||||
|
||||
/**
|
||||
* API Token
|
||||
*/
|
||||
private String apiKey;
|
||||
|
||||
/**
|
||||
* 默认TTS模型 免费模型: MOSS-TTSD-v0.5
|
||||
*/
|
||||
// private String defaultTtsModel = "fnlp/MOSS-TTSD-v0.5";
|
||||
private String defaultTtsModel = "FunAudioLLM/CosyVoice2-0.5B";
|
||||
|
||||
/**
|
||||
* 请求超时时间(毫秒)
|
||||
*/
|
||||
private int timeout = 30000;
|
||||
|
||||
/**
|
||||
* 是否启用SiliconFlow服务
|
||||
*/
|
||||
private boolean enabled = true;
|
||||
}
|
||||
Reference in New Issue
Block a user