业务逻辑优化

This commit is contained in:
2025-11-20 21:50:33 +08:00
parent d56009ef86
commit 0e78ecc1f1
6 changed files with 142 additions and 90 deletions

View File

@@ -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();

View File

@@ -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;
// }
}