public class SpeechSynthesizer
extends java.lang.Object
| 构造器和说明 |
|---|
SpeechSynthesizer(SpeechSynthesisConfig speechSynthesisConfig,
SpeechSynthesisRequest speechSynthesisRequest,
SpeechSynthesisListener eventListener)
初始化
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
initClient() |
byte[] |
read(java.io.InputStream inputStream,
org.apache.http.client.methods.CloseableHttpResponse response) |
protected static byte[] |
readChunkData(java.io.InputStream in) |
byte[] |
readStream(java.io.InputStream inputStream,
org.apache.http.client.methods.CloseableHttpResponse response)
读取chunked数据 pcm
|
SpeechSynthesizer |
synthesis(java.lang.String texts)
执行tts请求
|
SpeechSynthesizer |
synthesisLongText(java.lang.String texts)
长文本合成
|
public SpeechSynthesizer(SpeechSynthesisConfig speechSynthesisConfig, SpeechSynthesisRequest speechSynthesisRequest, SpeechSynthesisListener eventListener)
speechSynthesisConfig - 配置speechSynthesisRequest - 请求参数eventListener - 结果回调函数public void initClient()
public SpeechSynthesizer synthesis(java.lang.String texts)
texts - 文本public SpeechSynthesizer synthesisLongText(java.lang.String texts)
texts - 文本public byte[] read(java.io.InputStream inputStream,
org.apache.http.client.methods.CloseableHttpResponse response)
public byte[] readStream(java.io.InputStream inputStream,
org.apache.http.client.methods.CloseableHttpResponse response)
inputStream - inputStreamprotected static byte[] readChunkData(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionCopyright © 2023. All rights reserved.