ITextToSpeechCallback.aidl revision 90d15d2371ad85f22254be6985455aa2baa5d15d
1/* 2 * Copyright (C) 2011 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 */ 16package android.speech.tts; 17 18import android.speech.tts.VoiceInfo; 19 20/** 21 * Interface for callbacks from TextToSpeechService 22 * 23 * {@hide} 24 */ 25oneway interface ITextToSpeechCallback { 26 /** 27 * Tells the client that the synthesis has started. 28 * 29 * @param utteranceId Unique id identifying synthesis request. 30 */ 31 void onStart(String utteranceId); 32 33 /** 34 * Tells the client that the synthesis has finished. 35 * 36 * @param utteranceId Unique id identifying synthesis request. 37 */ 38 void onSuccess(String utteranceId); 39 40 /** 41 * Tells the client that the synthesis was stopped. 42 * 43 * @param utteranceId Unique id identifying synthesis request. 44 */ 45 void onStop(String utteranceId); 46 47 /** 48 * Tells the client that the synthesis failed, and fallback synthesis will be attempted. 49 * 50 * @param utteranceId Unique id identifying synthesis request. 51 */ 52 void onFallback(String utteranceId); 53 54 /** 55 * Tells the client that the synthesis has failed. 56 * 57 * @param utteranceId Unique id identifying synthesis request. 58 * @param errorCode One of the values from 59 * {@link android.speech.tts.v2.TextToSpeechClient.Status}. 60 */ 61 void onError(String utteranceId, int errorCode); 62 63 /** 64 * Inform the client that set of available voices changed. 65 */ 66 void onVoicesInfoChange(in List<VoiceInfo> voices); 67} 68