Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Test 1 in AudioInputProcessorIntegrationTest.cpp #12

Closed
shikha-bansal opened this issue May 25, 2017 · 6 comments
Closed

Test 1 in AudioInputProcessorIntegrationTest.cpp #12

shikha-bansal opened this issue May 25, 2017 · 6 comments

Comments

@shikha-bansal
Copy link

shikha-bansal commented May 25, 2017

I have the following questions regarding the tests in the AudioInputProcessorIntegrationTest.cpp file:

  1. class wakeWordTrigger , use TAP as initiator
    original : m_aip->recognize(audioProvider, Initiator::TAP, aipBegin, aipEnd, keyword);
    expected : m_aip->recognize(audioProvider, Initiator::WAKEWORD, aipBegin, aipEnd, keyword);

  2. Once I update wakeWordTrigger class to use WAKEWORD initator , the test works fine if ALEXA is the wakeword , but if a different wakeword is used AVS sends back an exception instead of directives.
    Diff keyword :
    Context built successfully:{"context":[{"header":{"namespace":"SpeechRecognizer","name":"RecognizerState"},"payload":{"wakeword":"XYZ"}},{"header":{"namespace":"Speaker","name":"VolumeState"},"payload":{"volume":50,"muted":0}}]}
    ALEXA keyword :
    Context built successfully:{"context":[{"header":{"namespace":"SpeechRecognizer","name":"RecognizerState"},"payload":{"wakeword":"ALEXA"}},{"header":{"namespace":"Speaker","name":"VolumeState"},"payload":{"volume":50,"muted":0}}]}

The only difference in the 2 context is the keyword.

Any suggestions ? Is the current release of AVS meant to work only with ALEXA keyword ?

@kencecka
Copy link
Contributor

Hi Shikha,

You are correct - AVS only supports "ALEXA" as a keyword. See the following link for specific documentation on this:

https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/context#recognizerstate

Let me know if you have further questions.

Ken

@shikha-bansal
Copy link
Author

Hi Ken ,
Thanks for your response. Wrt to point 1 ( wakeword vs tap as initiator).

A ) Wakeword as Initiator
Context built successfully:{"context":[{"header":{"namespace":"SpeechRecognizer","name":"RecognizerState"},"payload":{"wakeword":"ALEXA"}},{"header":{"namespace":"Speaker","name":"VolumeState"},"payload":{"volume":50,"muted":0}}]}

B) Tap as initaitor
Context built successfully:{"context":[{"header":{"namespace":"SpeechRecognizer","name":"RecognizerState"},"payload":{"wakeword":""}},{"header":{"namespace":"Speaker","name":"VolumeState"},"payload":{"volume":50,"muted":0}}]}

A , fails the test with the following error :
home/shikha.bansal/AVS/0.3/alexa-client-sdk-master/Integration/test/AudioInputProcessorIntegrationTest.cpp:967: Failure
Expected: (params.type) != (TestDirectiveHandler::DirectiveParams::Type::TIMEOUT), actual: 4-byte object <06-00 00-00> vs 4-byte object <06-00 00-00>

Please suggest.

@kencecka
Copy link
Contributor

Hi Shikha,

This is probably failing because you are missing the start/end indices in the Recognize Event payload:

        "payload": {
          "wakeWordIndices": {
            "startIndexInSamples": {{LONG}},
            "endIndexInSamples": {{LONG}}
          }   
        }

The sample wakeword detector included in release 0.3 is not able to detect these endpoints for the keyword, so they are omitted. AVS expects to see these indices with a "WAKEWORD" initiator. The integration test sets the initiator to "TAP" in this case, as there is really no difference between a wakeword and a tap if no indices are available.

Other wakeword detectors do provide the start/end indices, and for those, you can specify a "WAKEWORD" initiator, and see the event handled correctly by AVS.

Ken

@shikha-bansal
Copy link
Author

Thank you for your explanation Ken.

Best
Shikha

@JamieMeyers
Copy link
Contributor

Hi @shikha-bansal,

Are you still seeing the test failure, or are your issues resolved?

Thanks,
Jamie

@shikha-bansal
Copy link
Author

Resolved. Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants