Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.internal.app; |
| 18 | |
| 19 | import android.content.Intent; |
Dianne Hackborn | 18f0d35 | 2014-04-25 17:06:18 -0700 | [diff] [blame] | 20 | import android.os.Bundle; |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 21 | |
| 22 | import com.android.internal.app.IVoiceInteractor; |
Sandeep Siddhartha | 0558972 | 2014-07-17 16:21:54 -0700 | [diff] [blame^] | 23 | import android.hardware.soundtrigger.IRecognitionStatusCallback; |
| 24 | import android.hardware.soundtrigger.SoundTrigger; |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 25 | import android.service.voice.IVoiceInteractionService; |
| 26 | import android.service.voice.IVoiceInteractionSession; |
| 27 | |
| 28 | interface IVoiceInteractionManagerService { |
Dianne Hackborn | c03c916 | 2014-05-02 10:45:59 -0700 | [diff] [blame] | 29 | void startSession(IVoiceInteractionService service, in Bundle sessionArgs); |
| 30 | boolean deliverNewSession(IBinder token, IVoiceInteractionSession session, |
Dianne Hackborn | 18f0d35 | 2014-04-25 17:06:18 -0700 | [diff] [blame] | 31 | IVoiceInteractor interactor); |
Dianne Hackborn | c03c916 | 2014-05-02 10:45:59 -0700 | [diff] [blame] | 32 | int startVoiceActivity(IBinder token, in Intent intent, String resolvedType); |
| 33 | void finish(IBinder token); |
Sandeep | d701820 | 2014-07-10 15:15:39 -0700 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * Lists the registered Sound models for keyphrase detection. |
| 37 | * May be null if no matching sound models exist. |
| 38 | * |
| 39 | * @param service The current voice interaction service. |
| 40 | */ |
Sandeep Siddhartha | 0558972 | 2014-07-17 16:21:54 -0700 | [diff] [blame^] | 41 | List<SoundTrigger.KeyphraseSoundModel> listRegisteredKeyphraseSoundModels( |
| 42 | in IVoiceInteractionService service); |
Sandeep | d701820 | 2014-07-10 15:15:39 -0700 | [diff] [blame] | 43 | /** |
| 44 | * Updates the given keyphrase sound model. Adds the model if it doesn't exist currently. |
| 45 | */ |
Sandeep Siddhartha | 0558972 | 2014-07-17 16:21:54 -0700 | [diff] [blame^] | 46 | int updateKeyphraseSoundModel(in SoundTrigger.KeyphraseSoundModel model); |
| 47 | |
| 48 | /** |
| 49 | * Gets the properties of the DSP hardware on this device, null if not present. |
| 50 | */ |
| 51 | SoundTrigger.ModuleProperties getDspModuleProperties(in IVoiceInteractionService service); |
| 52 | /** |
| 53 | * Starts a recognition for the given keyphrase. |
| 54 | */ |
| 55 | int startRecognition(in IVoiceInteractionService service, int keyphraseId, |
| 56 | in SoundTrigger.KeyphraseSoundModel soundModel, in IRecognitionStatusCallback callback, |
| 57 | in SoundTrigger.RecognitionConfig recognitionConfig); |
| 58 | /** |
| 59 | * Stops a recognition for the given keyphrase. |
| 60 | */ |
| 61 | int stopRecognition(in IVoiceInteractionService service, int keyphraseId, |
| 62 | in IRecognitionStatusCallback callback); |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 63 | } |