Hi,
While testing some speech request I found wired symptom
that the server response which is against "Play BBC news"
request event have 2 speak directive JSON message but seems to have only one audio source.
--------abcde123
Content-Type: application/json; charset=UTF-8
{"directive":{"header":{
"namespace":"SpeechSynthesizer",
"name":"Speak",
"messageId":"0af78cbc-6e6b-4047-a329-08a11198713e",
"dialogRequestId":"dlgId-327b23c6"},"payload":
{"url":"cid:DeviceTTSRendererV4_02bdf61f-878b-4f00-bdbd-4c60fd2780ad_992416545",
"format":"AUDIO_MPEG",
"token":"amzn1.as-ct.v1.Domain:*****-4c60fd2780ad"}}}
--------abcde123
Content-Type: application/json; charset=UTF-8
{"directive":{"header":{
"namespace":"SpeechSynthesizer",
"name":"Speak",
"messageId":"27c92028-d402-4e06-94a8-e841129f0838",
"dialogRequestId":"dlgId-327b23c6"},
"payload":{
"url":"cid:DeviceTTSRendererV4_02bdf61f-878b-4f00-bdbd-4c60fd2780ad_1941122358",
"format":"AUDIO_MPEG",
"token":"amzn1.as-ct.v1.Domain:*****-4c60fd2780ad"}}}
--------abcde123
Content-Type: application/json; charset=UTF-8
{"directive":{"header":{
"namespace":"AudioPlayer",.........
--------abcde123
Content-ID: <DeviceTTSRendererV4_02bdf61f-878b-4f00-bdbd-4c60fd2780ad_992416545>
Content-Type: application/octet-stream
ID3
As you guys see in the above multipart message response
,they are consist of 4 JSON messages.
2 message are speak directive and one 1 message is play directive and last one is audio contents information and is indicate only first speak directive's contents ID.
As parsing the message we assume that the audio contents should be located after last message exactly after "ID3" string right?
so there is no problem with finding first speak directive's
audio contents position but how can I know the position of
second speak directive audio position?
when my code parsing this message, it fails to find second audio contents.
I wonder is this response message is normal and correct one? and there is something wrong in my parser or the server response is wrong.
Anyhow I just ignored second speak directive message and my code ruinng well like "Echo".
Any idea?
Thanks,
Soohwan