IVoiceInteractionManagerService.aidl revision 055897208d659e9734a82def88be4a806ff55448
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
17package com.android.internal.app;
18
19import android.content.Intent;
20import android.os.Bundle;
21
22import com.android.internal.app.IVoiceInteractor;
23import android.hardware.soundtrigger.IRecognitionStatusCallback;
24import android.hardware.soundtrigger.SoundTrigger;
25import android.service.voice.IVoiceInteractionService;
26import android.service.voice.IVoiceInteractionSession;
27
28interface IVoiceInteractionManagerService {
29    void startSession(IVoiceInteractionService service, in Bundle sessionArgs);
30    boolean deliverNewSession(IBinder token, IVoiceInteractionSession session,
31            IVoiceInteractor interactor);
32    int startVoiceActivity(IBinder token, in Intent intent, String resolvedType);
33    void finish(IBinder token);
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     */
41    List<SoundTrigger.KeyphraseSoundModel> listRegisteredKeyphraseSoundModels(
42            in IVoiceInteractionService service);
43    /**
44     * Updates the given keyphrase sound model. Adds the model if it doesn't exist currently.
45     */
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);
63}
64