新模型业务逻辑调整,以及衔接语更新

This commit is contained in:
2025-11-10 22:51:39 +08:00
parent d24afb1062
commit 2fa0d46d48
6 changed files with 642 additions and 118 deletions

View File

@@ -57,13 +57,11 @@ public class ElevenLabsClient {
Gson gson = new Gson();
StringEntity entity = new StringEntity(gson.toJson(payload), ContentType.APPLICATION_JSON);
httpPost.setEntity(entity);
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
HttpEntity responseEntity = response.getEntity();
if (responseEntity != null) {
try (InputStream inputStream = responseEntity.getContent();
FileOutputStream outputStream = new FileOutputStream(outputFilePath)) {
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {