业务逻辑优化
This commit is contained in:
@@ -101,7 +101,7 @@ public class ElevenLabsClient {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
try {
|
||||
// 使用第一个可用语音进行文本转语音(澳洲本地女声)
|
||||
String firstVoiceId = "LwSYl3oLKw4IEbIEei6q";
|
||||
String firstVoiceId = "56bWURjYFHyYyVf490Dp";
|
||||
textToSpeech(inputText, firstVoiceId, outputFile,httpClient);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -19,6 +19,10 @@ public class VoiceSettings {
|
||||
private double clarity;
|
||||
|
||||
private double speed;
|
||||
//
|
||||
// private double style;
|
||||
//
|
||||
// private Boolean use_speaker_boost;
|
||||
|
||||
public VoiceSettings(double stability, double similarity_boost, double rate,double start_time,double clarity, double speed) {
|
||||
this.stability = stability;
|
||||
@@ -27,6 +31,8 @@ public class VoiceSettings {
|
||||
this.start_time = start_time;
|
||||
this.clarity = clarity;
|
||||
this.speed = speed;
|
||||
// this.style = style;
|
||||
// this.use_speaker_boost = use_speaker_boost;
|
||||
}
|
||||
|
||||
// getter方法
|
||||
@@ -53,4 +59,11 @@ public class VoiceSettings {
|
||||
return speed;
|
||||
}
|
||||
|
||||
// public double getStyle() {
|
||||
// return style;
|
||||
// }
|
||||
//
|
||||
// public Boolean getUse_speaker_boost() {
|
||||
// return use_speaker_boost;
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user