-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTSService ts做close()后都会有抛出这个异常:TTSService - onFailurenull #6
Comments
这异常确实是关闭方法引起的,关闭ws太急,一些后续回调未能成功处理引发的问题,刚刚加了个循环判断,等待ws onClosed 回调成功后再结束close方法,请查看最新提交,如有更好的方法请指出,谢谢 |
感谢! |
刚测试还是最后抛了异常 20:48:56.577 [main] INFO io.ikfly.service.TTSService - 空转等待语音合成... |
你好,本地做了多次测试,并没有复现这个异常 onFailure:null - null |
应该是我用了VPN,网络不稳定也导致了这个问题。网好的情况下是没有抛出异常 |
发现还有另一个问题,抛出异常后,没法捕捉,整个进程就卡住了。 19:48:59.799 [main] INFO io.ikfly.service.TTSService - ws closing... 然后就卡了,进程没退出,但也没继续往后执行。。 |
`SSML ssml3 = SSML.builder().outputFormat(OutputFormat.audio_24khz_48kbitrate_mono_mp3)
.rate("-10%")
.synthesisText(content)
.outputFileName(fileName+"_3")
.voice(voice)
.build();
ts.sendText(ssml3);
//TODO 是否是每次都关,然后才会触发落地文件
每次执行完TTS,TTSService ts做close()后都会有抛出这个异常,请问是什么原因导致,还是使用方式问题?
17:44:15.650 [OkHttp https://speech.platform.bing.com/...] DEBUG io.ikfly.service.TTSService - onFailurenull
java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.kt:202)
at okio.RealBufferedSource.readByte(RealBufferedSource.kt:212)
at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
finish......
The text was updated successfully, but these errors were encountered: