14 Commits

Author SHA1 Message Date
Chris Thornton
7233603588 Merge \\"Fix a few log messages that didn\\'t have a space in the SoundTriggerTestApp\\" into nyc-mr1-dev am: ea7999dc3f
am: 1a4507cb8e

Change-Id: I4579b7ecd4781d56cc86878d8c145aa11e56ea81
2016-07-13 02:15:44 +00:00
Chris Thornton
2d2ba9d089 Fix a few log messages that didn't have a space in the SoundTriggerTestApp
Change-Id: If3b5ac6533429843d4be733bd31f2bb83e1d5971
2016-07-12 17:16:42 -07:00
Chris Thornton
dcd9a83e9e Merge \\"Updates to the sound trigger test app\\" into nyc-mr1-dev am: e1fdcc49fd
am: 8ce7b9b6ff

Change-Id: Ib96262c213f9cc397d49b6be6d2ca5975a580ce4
2016-07-08 18:09:38 +00:00
Chris Thornton
dfa7c3b0dc Updates to the sound trigger test app
Moved the logic for talking to the system service into a service in the
app - this now lets you close the activity and still be able to receive
events. Additionally, we get CLI support using commands with the intent
com.android.intent.action.MANAGE_SOUND_TRIGGER.

Bug: 29073629

Change-Id: Ie904b73b4414f2c9fded013aeb5e6c6c3a67f5d3
2016-07-07 15:00:15 -07:00
Ian Rogers
81c18e6f99 Remove @Nullable from primitive/void types.
Erroneous use of @Nullable caught by error prone.
Bug: 27723540

Change-Id: Ida76b2fd221142980da5c018e57c96cc6920ebc0
2016-05-10 09:46:09 -07:00
Chris Thornton
15ab2b45e7 Updates to sound trigger test app.
Now supports loading model information from .properties files inside the
app's data directory. This lets you prepare models for your actual
device, rather than just fake data. If no .properties files are present,
falls back to the default fake three models.

Also adds support for playing some trigger audio, so you can use the
same device to (hopefully) have a trigger be detected.

Change-Id: I003849eb11d4995534d4c070838810d4519991f8
2016-04-10 21:37:31 -07:00
Arunesh Mishra
73db9c2eb2 Fix permission string typo for test app.
Bug: 27875640
Change-Id: I2052e40d86ffcfbbcdef15ab3bec68ce1bdfa736
2016-03-28 13:58:07 -07:00
Joe Onorato
0aa05d7388 Turn down the logging a little bit.
Change-Id: I44c51d5f8248df1f8cca19da802ee891afe78af7
2016-03-04 12:21:30 -08:00
Arunesh Mishra
f47f173b06 Fix AlwaysOnHotwordDetector recognition event bug.
Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.

Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.

Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576
2016-02-24 12:57:01 -08:00
Arunesh Mishra
2d1de78a4c Unload logic for generic and keyphrase sound models.
When delete is called, now the STH unloads the corresponding models.

Fix bug with keyphrase where a delete call didn't unload (or stop)
the keyphrase model.

Bug: 27279380
Change-Id: Ia34f713d2aecef4102c0f0ccc57b8d2e5febe4bb
2016-02-22 15:19:44 -08:00
Arunesh Mishra
933da8150c Fix minor bugs:
- Fix issue when multiple starts cause multiple spurious loads to be sent to
   the native layer.
 - Fix scrolling issue in the native app.

Bug: 27222043
Change-Id: Iddf36a8b68637f478dc23b001ecbde352db3a5f0
2016-02-19 15:06:27 -08:00
Arunesh Mishra
3fff7f5634 SoundTriggerHelper changes for GenericSoundModels.
- Refactoring SoundTriggerHelper to handle generic sound models.
     - Ability to store multiple models, callback and state information.
     - Separate out initialization to be done per voice model, per any model
     and per generic model.
 - Minor change to the API exposed -- removing the Handler from the
   createSoundTriggerDetector call.
 - Added callback processing for onRecognitionEvent().
 - Added logic for stopAll().
 - Changes to the SoundTriggerTestApp to start/stop recognition.
     - Multiple models (3).
     - Ability to start/stop/load/unload individual models.

Bug: 22860713
Bug: 27222043
Change-Id: Ie5d811babb956bead653fb560a43f1e549ed11bd
2016-02-17 14:24:03 -08:00
Arunesh Mishra
c722ec4105 Fix SoundTriggerModel uses to GenericSoundModel.
Change-Id: I30308b39536864d7b9640367861730e3b1b12129
2016-01-27 13:37:27 -08:00
Arunesh Mishra
a772e5fc06 SoundTrigger API improvements.
This CL implements the SoundTrigger API improvements as given in b/22860713. Only the java-level
parts are implemented in this CL.

Key changes include:

* Addition of a SoundTriggerManager/SoundTriggerDetector system API to manage
  the sound-trigger based sound models.
* Addition of a SoundTriggerService service that manages all sound models
  including voice (keyphrase) and sound-trigger based models.
* Includes logic to write sound-trigger based models to the database.
* VoiceInteractionManager service now uses SoundTriggerService instead of
  SoundTriggerHelper.

Bug: 22860713
Change-Id: I7b5c0ed80702527c4460372efeb5e542d3693a69
2016-01-27 12:49:20 -08:00