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

AVS SDK Interface #37

Closed
zx-stark opened this issue Jun 26, 2017 · 3 comments
Closed

AVS SDK Interface #37

zx-stark opened this issue Jun 26, 2017 · 3 comments

Comments

@zx-stark
Copy link

Hi friends,

  1. Which interface in AIP we can load when WWE trigger the AIP to enter the listening state? is it AbstractKeywordDetector::notifyKeyWordObservers?

  2. Which interface we can load to tell the avs about system event? such as wifi state.

  3. Has the red circle part in the picture (read data from SDS to AIP )been realized in AVS SDK?
    image

@kencecka
Copy link
Contributor

Hi @zx-stark,

  1. Which interface in AIP we can load when WWE trigger the AIP to enter the listening state? is it AbstractKeywordDetector::notifyKeyWordObservers?

If you would like to utilize a KWD with AIP, you will need to implement KeyWordObserverInterface, register your implementation as an observer of your KWD, and in your implementation of KeyWordObserverInterface::onKeyWordDetected(), call AudioInputProvider::recognize(). There is an example of this in AudioInputProcessorIntegrationTest.cpp - see the wakeWordTrigger class.

  1. Which interface we can load to tell the avs about system event? such as wifi state.

That is part of the UX Guidelines - specifically the "System Error" state. The current release of the SDK does not address UX Guidelines, but will add this in a future release.

  1. Has the red circle part in the picture (read data from SDS to AIP )been realized in AVS SDK?

Yes. When you call AudioInputProcessor::recognize(), you pass an AudioProvider as one of the parameters. The AudioProvider contains a std::shared_ptr to an AudioInputStream, which in turn is an alias for a SharedDataStream. AudioInputProvider creates a reader from that stream, and passes it to a MessageSenderInterface (typically an AVSConnectionManager), which proceeds to stream audio data from the reader to AVS.

Ken

@JamieMeyers
Copy link
Contributor

@zx-stark, to add some more clarify on 2, currently things like WiFi or network connection status will not directly be used in the SDK (no listeners for those events). Instead, you will inform different libraries of the state. For instance, you can inform ACL that the network connection is up and to connect by using the AVSConnectionManager::enable() function, and when the network connection goes down, AVSConnectionManager::disable(). You can also trigger an immediate connection retry using AVSConnectionManager::reconnect().

@kencecka
Copy link
Contributor

Closing for now. Please reopen if you have further questions on this topic.

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

3 participants