tts-edge-java
tts-edge-java copied to clipboard
我测试了一下,生成的音频没有演示网站的好,请问知道是什么原因?
test.mp3 配置什么的都没改。这个代码生成的:
TTS tts = new TTS(voice, content)
.isRateLimited(true) // Set to true to resolve the rate limiting issue in certain regions.
.formatMp3(); // default mp3.
ByteArrayOutputStream stream = tts.transToAudioStream();
// Write to file to test if the stream is correct.
try (FileOutputStream fileOutputStream = new FileOutputStream("./storage/test.mp3")) {
stream.writeTo(fileOutputStream);
} catch (IOException e) {
e.printStackTrace();
}