bdtts-OnlineAuth: this=com.baidu.tts.auth.e$a@a549eb--error=(-1)online engine auth failure
据了解在线合成是有免费份额的,但是使用新申请的appid、apikey、apiSecret提示授权失败
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块
是的,可以测试下官方demo,不修改代码看是否还有次报错。
online tts ,但看log是引擎授权失败
error=(-1)online engine auth failure
请问你现在测试的是哪个调用方式呢?
在控制台领取免费配额后还是有问题,附上日志:
11-17 10:34:09.362 5540-5581/ D/bdtts-Memorizer: + run f=java.util.concurrent.FutureTask@ed54583
11-17 10:34:09.362 5540-5581/ D/bdtts-OnlineAuth: enter online auth
11-17 10:34:09.372 5540-5581/ D/bdtts-OnlineAuth: url=https://openapi.baidu.com/oauth/2.0/token?grant_type=client_credentials&client_id=sgIdNqKN2fnmHZBWmpKftUD0&client_secret=lrgVlwLC94q762QsbdwGQ79reYTh9f5O
11-17 10:34:09.400 5540-5581/ E/AsyncHttpRequest: Unhandled exception origin cause
java.lang.SecurityException: Permission denied (missing INTERNET permission?)
at java.net.InetAddress.lookupHostByName(InetAddress.java:468)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:142)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:366)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
at com.baidu.tts.loopj.AsyncHttpRequest.run(AsyncHttpRequest.java:107)
at com.baidu.tts.loopj.SyncHttpClient.sendRequest(SyncHttpClient.java:93)
at com.baidu.tts.loopj.AsyncHttpClient.post(AsyncHttpClient.java:1043)
at com.baidu.tts.auth.e.d(OnlineAuth.java:156)
at com.baidu.tts.auth.e.call(OnlineAuth.java:33)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.baidu.tts.k.c.a(Memorizer.java:51)
at com.baidu.tts.auth.a$b.a(AuthClient.java:130)
at com.baidu.tts.auth.a$b.call(AuthClient.java:98)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.InetAddress.lookupHostByName(InetAddress.java:455)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:142)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:366)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
at com.baidu.tts.loopj.AsyncHttpRequest.run(AsyncHttpRequest.java:107)
at com.baidu.tts.loopj.SyncHttpClient.sendRequest(SyncHttpClient.java:93)
at com.baidu.tts.loopj.AsyncHttpClient.post(AsyncHttpClient.java:1043)
at com.baidu.tts.auth.e.d(OnlineAuth.java:156)
at com.baidu.tts.auth.e.call(OnlineAuth.java:33)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.baidu.tts.k.c.a(Memorizer.java:51)
at com.baidu.tts.auth.a$b.a(AuthClient.java:130)
at com.baidu.tts.auth.a$b.call(AuthClient.java:98)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: android_getaddrinfo failed: EACCES (Permission denied)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.InetAddress.lookupHostByName(InetAddress.java:455)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:142)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:366)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
at com.baidu.tts.loopj.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
at com.baidu.tts.loopj.AsyncHttpRequest.run(AsyncHttpRequest.java:107)
at com.baidu.tts.loopj.SyncHttpClient.sendRequest(SyncHttpClient.java:93)
at com.baidu.tts.loopj.AsyncHttpClient.post(AsyncHttpClient.java:1043)
at com.baidu.tts.auth.e.d(OnlineAuth.java:156)
at com.baidu.tts.auth.e.call(OnlineAuth.java:33)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.baidu.tts.k.c.a(Memorizer.java:51)
at com.baidu.tts.auth.a$b.a(AuthClient.java:130)
at com.baidu.tts.auth.a$b.call(AuthClient.java:98)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.lang.Thread.run(Thread.java:818)
11-17 10:34:09.401 5540-5581/ D/bdtts-OnlineAuth: this=com.baidu.tts.auth.e$a@55d973a--error=(-1)online engine auth failure
11-17 10:34:09.401 5540-5581/ D/bdtts-OnlineAuth: end online auth
11-17 10:34:09.401 5540-5581/ D/bdtts-Memorizer: - run f=java.util.concurrent.FutureTask@ed54583
11-17 10:34:09.402 5540-5577/ E/TTSClientBaidu: auth failed errorMsg=(-1)online engine auth failure
11-17 10:34:09.411 5540-5580/ I/OpenGLRenderer: Initialized EGL, version 1.4
11-17 10:34:09.423 5540-5580/ D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
好的,我再重新创建应用产生新的鉴权信息,另外,免费额度如何在控制台领取呢??
您好,免费额度需要在控制台领取。鉴权信息请不要公开,建议删除应用后重新创建。
附上新申请的: appid:"22990623";apikey:"7xutyfLb3SBuV80z8TQ6sOVI";apiSecret:"MGhIavPQlW9BUoe1SyL9W8KpFEnk2U91"