Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 1 | /* |
Bjorn Bringert | 50e657b | 2011-03-08 16:00:40 +0000 | [diff] [blame] | 2 | * Copyright (C) 2011 The Android Open Source Project |
Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 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 | */ |
Charles Chen | f85aa5a | 2009-06-10 10:39:55 -0700 | [diff] [blame] | 16 | package android.speech.tts; |
Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 17 | |
Przemyslaw Szczepaniak | 90d15d2 | 2013-06-14 12:02:53 +0100 | [diff] [blame] | 18 | import android.speech.tts.VoiceInfo; |
| 19 | |
Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 20 | /** |
Bjorn Bringert | 50e657b | 2011-03-08 16:00:40 +0000 | [diff] [blame] | 21 | * Interface for callbacks from TextToSpeechService |
Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 22 | * |
| 23 | * {@hide} |
| 24 | */ |
Bjorn Bringert | 50e657b | 2011-03-08 16:00:40 +0000 | [diff] [blame] | 25 | oneway interface ITextToSpeechCallback { |
Przemyslaw Szczepaniak | 90d15d2 | 2013-06-14 12:02:53 +0100 | [diff] [blame] | 26 | /** |
| 27 | * Tells the client that the synthesis has started. |
| 28 | * |
| 29 | * @param utteranceId Unique id identifying synthesis request. |
| 30 | */ |
Narayan Kamath | 754c72e | 2011-11-09 14:22:32 +0000 | [diff] [blame] | 31 | void onStart(String utteranceId); |
Przemyslaw Szczepaniak | 90d15d2 | 2013-06-14 12:02:53 +0100 | [diff] [blame] | 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); |
Jean-Michel Trivi | 2c0c2af | 2009-05-21 18:46:10 -0700 | [diff] [blame] | 67 | } |