|
@@ -1,6 +1,8 @@
|
|
|
package org.thyy.thirdpartapi.tts;
|
|
|
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
+import lombok.Getter;
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -9,9 +11,20 @@ import org.springframework.stereotype.Component;
|
|
|
@Data
|
|
|
@ConfigurationProperties("thyy.tts")
|
|
|
public class TtsConfig {
|
|
|
+
|
|
|
+ @AllArgsConstructor
|
|
|
+ @Getter
|
|
|
+ public static enum ServiceName {
|
|
|
+ xfyun("xfyun"),
|
|
|
+ ttstext("ttstext");
|
|
|
+ private final String name;
|
|
|
+ }
|
|
|
+
|
|
|
private String directory;
|
|
|
private String speechUrl;
|
|
|
- private String service;
|
|
|
+ private ServiceName service;
|
|
|
+
|
|
|
+
|
|
|
private String appId;
|
|
|
private String apiKey;
|
|
|
private String apiSecret;
|