类 SpeechSynthesizer

java.lang.Object
com.tencent.tts.service.SpeechSynthesizer

public class SpeechSynthesizer
extends java.lang.Object
  • 构造器概要

    构造器 
    构造器 说明
    SpeechSynthesizer​(SpeechSynthesisConfig speechSynthesisConfig, SpeechSynthesisRequest speechSynthesisRequest, SpeechSynthesisListener eventListener)
    初始化
  • 方法概要

    修饰符和类型 方法 说明
    void initClient()
    initClient 初始化client
    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)
    长文本合成

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

  • 方法详细资料

    • initClient

      public void initClient()
      initClient 初始化client
    • synthesis

      public SpeechSynthesizer synthesis​(java.lang.String texts)
      执行tts请求
      参数:
      texts - 文本
      返回:
      SpeechSynthesizer
    • synthesisLongText

      public SpeechSynthesizer synthesisLongText​(java.lang.String texts)
      长文本合成
      参数:
      texts - 文本
      返回:
      SpeechSynthesizer
    • read

      public byte[] read​(java.io.InputStream inputStream, org.apache.http.client.methods.CloseableHttpResponse response)
    • readStream

      public byte[] readStream​(java.io.InputStream inputStream, org.apache.http.client.methods.CloseableHttpResponse response)
      读取chunked数据 pcm
      参数:
      inputStream - inputStream
      返回:
      byte[]
    • readChunkData

      protected static byte[] readChunkData​(java.io.InputStream in) throws java.io.IOException
      抛出:
      java.io.IOException