openvoice SDK支持32位Linux嵌入式系统吗


(chaotictimes) #1

我集成了openvoice sdk在我的linux系统arm板上,调试了一个星期,愣是没有调通。错误如下: D 2018-01-05 08:57:01.476714 [speech.Connection] uws recv message, length 32347, opcode 0x2 W 2018-01-05 08:57:01.516079 [speech.Connection] recv: protobuf parse failed D 2018-01-05 08:57:01.516507 [speech.tts] TtsImpl.send_reqs wait req available D 2018-01-05 08:57:01.516850 [speech.tts] TtsImpl.poll (1) error, remove front op D 2018-01-05 08:57:01.517502 [speech.Connection] uws disconnected, code 1006, msg length 0, stage 3

各位大神能给点提示么?是否哪个关键点没有弄明白?授权认证提示是可以了的。


(yam.zhang) #2

麻烦提供一下完整的logging哟,从开启到出现bug 的完整的logging。我们这边看看呢,辛苦啦~


(chaotictimes) #3

谢谢!下面是TTS完整log:

D 2018-01-05 15:59:06.081551 [speech.tts] thread ‘gen_results’ run

D 2018-01-05 15:59:06.096026 [speech.tts] thread ‘send_reqs’ begin

D 2018-01-05 15:59:06.096671 [speech.tts] TtsImpl.send_reqs wait req available

D 2018-01-05 15:59:06.107177 [speech.Connection] work thread runing

D 2018-01-05 15:59:06.107986 [speech.Connection] work thread: connecting

D 2018-01-05 15:59:06.108840 [speech.Connection] server uri is wss://apigwws.open.rokid.com:443/api

D 2018-01-05 15:59:06.121967 [speech.tts] TtsImpl.poll wait

D 2018-01-05 15:59:06.184567 [speech.tts] speak 只要998,若琪抱回家。998你买不了吃亏,998你买不了上当

D 2018-01-05 15:59:06.197278 [speech.tts] do_ctl_new_op: start

D 2018-01-05 15:59:06.198257 [speech.tts] do_request: send req to server. (1:只要998,若琪抱回家。998你买不了吃亏,998你买不了上当), codec(pcm), declaimer(zh), samplerate(16000)

D 2018-01-05 15:59:06.223502 [speech.Connection] work thread: loop

D 2018-01-05 15:59:06.566792 [speech.Connection] uws connected, 0x1a6b510

D 2018-01-05 15:59:06.587057 [speech.Connection] md5 src = key=66F5032EAF5D475FA7FA41F7C027F5EF&device_type_id=4C54BA5E59034EF9B64519C85D3532E8&device_id=12345678&service=tts&version=2&time=1517846346567213&secret=DC82A5432B594D95825F4F1598A06935, md5 result = 450FC2CF8A7042796D64BD889E3144FF

D 2018-01-05 15:59:06.663908 [speech.Connection] uws recv message, length 2, opcode 0x2

D 2018-01-05 15:59:06.665101 [speech.Connection] auth result = 0

D 2018-01-05 15:59:06.668544 [speech.tts] req (1) sent, req done

D 2018-01-05 15:59:06.669271 [speech.tts] TtsImpl.send_reqs wait op finish

D 2018-01-05 15:59:07.072245 [speech.Connection] uws recv message, length 32347, opcode 0x2

D 2018-01-05 15:59:07.114450 [speech.Connection] uws disconnected, code 1006, msg length 0, stage 3

W 2018-01-05 15:59:07.124816 [speech.Connection] recv: protobuf parse failed

D 2018-01-05 15:59:07.148311 [speech.tts] TtsImpl.send_reqs wait req available

D 2018-01-05 15:59:07.149303 [speech.tts] TtsImpl.poll (1) error, remove front op

speak 1 error: 104

D 2018-01-05 15:59:07.170121 [speech.tts] TtsImpl.release, initialized = 1

D 2018-01-05 15:59:07.190551 [speech.Connection] release, notify work thread

D 2018-01-05 15:59:07.200586 [speech.Connection] work thread: loop end

D 2018-01-05 15:59:07.235933 [speech.Connection] work thread quit

D 2018-01-05 15:59:07.243775 [speech.Connection] join work thread

D 2018-01-05 15:59:07.254113 [speech.Connection] work thread exited

D 2018-01-05 15:59:07.255107 [speech.tts] thread ‘gen_results’ quit

D 2018-01-05 15:59:07.258093 [speech.tts] thread ‘send_reqs’ quit

下面是speech的错误信息:

D 2018-01-06 14:32:03.715432 [speech.Connection] work thread runing

D 2018-01-06 14:32:03.718813 [speech.speech] thread ‘send_reqs’ begin

D 2018-01-06 14:32:03.744790 [speech.speech] thread ‘gen_results’ run

D 2018-01-06 14:32:03.745570 [speech.speech] SpeechImpl.poll wait

D 2018-01-06 14:32:03.745992 [speech.Connection] work thread: connecting

D 2018-01-06 14:32:03.754998 [speech.Connection] server uri is wss://apigwws.open.rokid.com:443/api

D 2018-01-06 14:32:03.757243 [speech.speech] SpeechImpl.send_reqs wait req available

D 2018-01-06 14:32:03.837591 [speech.Connection] work thread: loop

D 2018-01-06 14:32:04.270297 [speech.Connection] uws connected, 0x98e2d8

D 2018-01-06 14:32:04.273359 [speech.Connection] md5 src = key=66F5032EAF5D475FA7FA41F7C027F5EF&device_type_id=4C54BA5E59034EF9B64519C85D3532E8&device_id=12345678&service=speech&version=2&time=1517927524271152&secret=DC82A5432B594D95825F4F1598A06935, md5 result = 2F9893EEB49D8B5C5EF773C0F3974AEF

D 2018-01-06 14:32:04.347880 [speech.Connection] uws recv message, length 2, opcode 0x2

D 2018-01-06 14:32:04.349058 [speech.Connection] auth result = 0

D 2018-01-06 14:32:04.737761 [speech.speech] SpeechOptions modified to: vad(local:0), codec(pcm), lang(zh), no_nlp(0), no_intermediate_asr(0)

D 2018-01-06 14:32:04.738976 [speech.speech] put text 1, 你好

D 2018-01-06 14:32:04.740294 [speech.speech] SpeechImpl.send_reqs awake

D 2018-01-06 14:32:04.741177 [speech.speech] do_ctl_change_op: current op is (nil)

D 2018-01-06 14:32:04.741785 [speech.speech] do_ctl_change_op: req id(1), type(0)

D 2018-01-06 14:32:04.742552 [speech.speech] SpeechImpl.do_request (1) send text req

D 2018-01-06 14:32:04.762296 [speech.speech] req (1) last data sent, req done

D 2018-01-06 14:32:04.762887 [speech.speech] SpeechImpl.send_reqs wait op finish

W 2018-01-06 14:32:14.777356 [speech.speech] gen_results: (1) op timeout, set op error

D 2018-01-06 14:32:14.778736 [speech.speech] SpeechImpl.send_reqs wait req available

D 2018-01-06 14:32:14.779528 [speech.speech] SpeechImpl.poll (1) error, remove front op

speech 1 error: code 103

D 2018-01-06 14:32:14.781532 [speech.speech] SpeechImpl.release, initialized = 1

D 2018-01-06 14:32:14.782279 [speech.Connection] release, notify work thread

D 2018-01-06 14:32:14.783401 [speech.Connection] uws disconnected, code 1000, msg length 0, stage 5

D 2018-01-06 14:32:14.793082 [speech.Connection] join work thread

D 2018-01-06 14:32:14.859374 [speech.Connection] work thread: loop end

D 2018-01-06 14:32:14.860027 [speech.Connection] work thread quit

D 2018-01-06 14:32:14.870289 [speech.Connection] work thread exited

D 2018-01-06 14:32:14.871498 [speech.speech] thread ‘gen_results’ quit

D 2018-01-06 14:32:14.873453 [speech.speech] SpeechImpl.send_reqs awake

D 2018-01-06 14:32:14.874328 [speech.speech] thread ‘send_reqs’ quit


(yam.zhang) #4

你的sdk源码是哪里得到的,是自己编译出来运行的吗? 编译过程有没有改什么东西?


(chaotictimes) #5

rokid官方github上的sdk,你们从后台可以看到我的请求吗?能否帮忙分析下,谢谢! 现在情况是tts能收到服务器响应,但是始终recv: protobuf parse failed; 而speech,始终收不到服务器响应,超时。


(chen.zhang) #6

我测试了一下github上最新的版本,可以运行。 详细说一下你们怎么编译的吧,整个过程。 还有在源码目录下执行git log,把输出给我看一下,看看你们编译的是哪个版本的sdk。


(chaotictimes) #7

git log:

QQ图片20180206162800

交叉编译(arm-buildroot-linux-uclibcgnueabi-g++/arm-buildroot-linux-uclibcgnueabi-gcc):

在这个平台上pb.h里的# define pb_packed attribute((packed))需要注释掉__attribute__((packed)),不然speech的时候生成protobuff失败

tts demo错误提示

speech demo 错误提示:


(chen.zhang) #8

怀疑是注释掉pb_packed的问题,我需要你们的工具链验证


(chaotictimes) #9

我不注释掉,tts demo也是报同样错误的。 pb_packed对sub_message有影响,speech因为有嵌套,不去掉会导致protobuff生成失败。 工具链我放到了服务器,麻烦到下面这个地址下载,谢谢!

http://120.25.106.210/download/vtcs_toolchain.tar.gz


(chen.zhang) #10

不注释掉时错误是什么样子?


(chaotictimes) #11

不注释掉 tts的错误还是一样的:

uws disconnected, code 1006, msg length 0, stage 3这个应该是服务器错误异常断开吧

speech错误:


(chaotictimes) #12

今天运行tts demo比较大概率会出现如下结果,log信息如下:

昨天运行时一直会提示recv: protobuf serialize failed,今天这个错误概率比较小一些了,但是收到一个包后,等待后续包的到来,一直会超时(能收到“你好若琪”的语音),不能收到完整信息。


(chaotictimes) #13

要命的uWebSocket,踩到坑了