blob: 3c808ff16d4dc878744d3c90a8d0b74ee08dc08b [file] [log] [blame]
Jean-Michel Trivi2c0c2af2009-05-21 18:46:10 -07001/*
Bjorn Bringert50e657b2011-03-08 16:00:40 +00002 * Copyright (C) 2011 The Android Open Source Project
Jean-Michel Trivi2c0c2af2009-05-21 18:46:10 -07003 *
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 Chenf85aa5a2009-06-10 10:39:55 -070016package android.speech.tts;
Jean-Michel Trivi2c0c2af2009-05-21 18:46:10 -070017
Przemyslaw Szczepaniak90d15d22013-06-14 12:02:53 +010018import android.speech.tts.VoiceInfo;
19
Jean-Michel Trivi2c0c2af2009-05-21 18:46:10 -070020/**
Bjorn Bringert50e657b2011-03-08 16:00:40 +000021 * Interface for callbacks from TextToSpeechService
Jean-Michel Trivi2c0c2af2009-05-21 18:46:10 -070022 *
23 * {@hide}
24 */
Bjorn Bringert50e657b2011-03-08 16:00:40 +000025oneway interface ITextToSpeechCallback {
Przemyslaw Szczepaniak90d15d22013-06-14 12:02:53 +010026 /**
27 * Tells the client that the synthesis has started.
28 *
29 * @param utteranceId Unique id identifying synthesis request.
30 */
Narayan Kamath754c72e2011-11-09 14:22:32 +000031 void onStart(String utteranceId);
Przemyslaw Szczepaniak90d15d22013-06-14 12:02:53 +010032
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 Trivi2c0c2af2009-05-21 18:46:10 -070067}