0
을이 내 자바 코드 생성하지 : 이클립스의 코드를 실행하면왓슨 텍스트 오디오 출력
public static void main(String[] args) {
TextToSpeech textService = new TextToSpeech(IBM_WATSON_USERNAME, IBM_WATSON_PASSWORD);
//String voice = "en-US_AllisonVoice";
String text = "This is Just awesome And i am going to experience the effect";
//String format = "audio/mp3";
try {
InputStream in = textService.synthesize(text, Voice.EN_ALLISON, AudioFormat.OGG_VORBIS)
.execute();
System.out.println(in.available());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
, 난 점점 오전 :
Dec 12, 2017 3:05:08 PM okhttp3.internal.platform.Platform log
INFO: --> POST https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_AllisonVoice&accept=audio/ogg;%20codecs%3Dvorbis http/1.1 (71-byte body)
Dec 12, 2017 3:05:09 PM okhttp3.internal.platform.Platform log
INFO: <-- 200 OK https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_AllisonVoice&accept=audio/ogg;%20codecs%3Dvorbis (588ms, unknown-length body)
출력을위한을 in.available() : 0
왜 오디오가 들리지 않습니까? POST 요청에 따라 텍스트가 게시되지 않는 것을 볼 수 있습니다. 무엇이 누락 되었습니까?
나를 도와 줄 수있는 사람이 있니? –