alexa-samples / Alexa-Gadgets-Raspberry-Pi-Samples

This repository enables you to prototype an Alexa Gadget using Raspberry Pi. It includes Python-based software, sample projects, and step-by-step instructional guides that walk you through how to use key features of the Alexa Gadgets Toolkit to create new, engaging customer interactions with gadget devices.
Other
91 stars 29 forks source link

Speechmarks missing `playerOffsetInMilliseconds` #3

Open jayeheffernan opened 4 years ago

jayeheffernan commented 4 years ago

I'm trying to modify these examples to be able to sync an animation on a Raspberry Pi to the voice of an Alexa Echo. I am receiving the speech data, but is seems to be missing some of the data required to sync. The documentation for the speechdata interface (linked to in your README, here) suggests:

To determine how to sync speechmark data to Alexa's speech, use startOffsetInMilliSeconds minus playerOffsetInMilliseconds.

The packets I am receiving look just like the example in the README:

# Speechmark
{ {'payload': {'speechmarksData': [{'value': 't', 'type': 'VISEME', 'startOffsetInMilliSeconds': 708}]}, 'header': {'namespace': 'Alexa.Gadget.SpeechData', 'name': 'Speechmarks'}} }

They have a startOffsetInMilliSeconds, but no playerOffsetInMilliseconds. Any idea how to sync an animation to the speech data without this value?

vartakr commented 4 years ago

Hi Jaye,

Thank you for reaching out to us. We are currently looking into this issue, and we will get back to you as soon as we have an update regarding this.