Home
last modified time | relevance | path

Searched refs:TextToSpeech (Results 1 – 25 of 37) sorted by relevance

12

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/tts/
DTtsPlaybackPreferenceControllerTest.java31 import android.speech.tts.TextToSpeech;
71 private static final TextToSpeech.EngineInfo ENGINE_INFO = new TextToSpeech.EngineInfo();
91 private TextToSpeech mTextToSpeech;
138 TextToSpeech.Engine.DEFAULT_RATE); in setUp()
140 TextToSpeech.Engine.DEFAULT_PITCH); in setUp()
146 mPreferenceController.mOnInitListener.onInit(TextToSpeech.SUCCESS); in onCreate_startsCheckVoiceData()
155 TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); in onCreate_startsCheckVoiceData()
167 TextToSpeech.Engine.CHECK_VOICE_DATA_PASS, /* data= */ null); in voiceDataCheck_processActivityResult_dataIsNull_defaultSynthRemainsUnchanged()
182 TextToSpeech.Engine.CHECK_VOICE_DATA_PASS, data); in voiceDataCheck_processActivityResult_dataIsNotNull_updatesDefaultSynth()
196 data.putStringArrayListExtra(TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES, in voiceDataCheck_processActivityResult_checkSuccess_hasVoices_populatesPreference()
[all …]
DTtsPlaybackSettingsManagerTest.java31 import android.speech.tts.TextToSpeech;
56 private TextToSpeech mTts;
68 TextToSpeech.Engine.DEFAULT_RATE); in setUp()
70 TextToSpeech.Engine.DEFAULT_PITCH); in setUp()
75 int newSpeechRate = TextToSpeech.Engine.DEFAULT_RATE + 40; in updateSpeechRate_updatesSetting()
78 Settings.Secure.TTS_DEFAULT_RATE, TextToSpeech.Engine.DEFAULT_RATE)).isEqualTo( in updateSpeechRate_updatesSetting()
84 int newSpeechRate = TextToSpeech.Engine.DEFAULT_RATE + 40; in updateSpeechRate_updatesTts()
91 int newSpeechRate = TextToSpeech.Engine.DEFAULT_RATE + 40; in getCurrentSpeechRate_returnsCorrectRate()
99 int newSpeechRate = TextToSpeech.Engine.DEFAULT_RATE + 40; in resetSpeechRate_setsToDefault()
105 TextToSpeech.Engine.DEFAULT_RATE); in resetSpeechRate_setsToDefault()
[all …]
DPreferredEngineOptionsPreferenceControllerTest.java28 import android.speech.tts.TextToSpeech;
57 private static final TextToSpeech.EngineInfo OTHER_ENGINE_INFO = new TextToSpeech.EngineInfo();
58 private static final TextToSpeech.EngineInfo CURRENT_ENGINE_INFO =
59 new TextToSpeech.EngineInfo();
80 private TextToSpeech mTextToSpeech;
174 mPreferenceController.onUpdateEngine(TextToSpeech.SUCCESS); in performClick_otherEngine_initSuccess_changeCurrentEngine()
190 mPreferenceController.onUpdateEngine(TextToSpeech.ERROR); in performClick_otherEngine_initFail_keepCurrentEngine()
210 TextToSpeech createTts(TextToSpeech.OnInitListener listener, String engine) { in createTts()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/
DTextToSpeechFragment.java28 import android.speech.tts.TextToSpeech;
93 private int mDefaultRate = TextToSpeech.Engine.DEFAULT_RATE;
112 private TextToSpeech mTts = null;
134 private final TextToSpeech.OnInitListener mInitListener = new TextToSpeech.OnInitListener() {
146 private final TextToSpeech.OnInitListener mUpdateListener = new TextToSpeech.OnInitListener() {
189 getActivity().setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM); in onCreate()
191 mTts = new TextToSpeech(getActivity().getApplicationContext(), mInitListener); in onCreate()
248 mDefaultRate = TextToSpeech.Engine.DEFAULT_RATE; in initSettings()
257 List<TextToSpeech.EngineInfo> engines = mEnginesHelper.getEngines(); in initSettings()
258 for (TextToSpeech.EngineInfo engine : engines) { in initSettings()
[all …]
DTtsEngineSettingsFragment.java28 import android.speech.tts.TextToSpeech;
91 private TextToSpeech mTts;
95 private final TextToSpeech.OnInitListener mTtsInitListener = new TextToSpeech.OnInitListener() {
98 if (status != TextToSpeech.SUCCESS) {
115 if (TextToSpeech.Engine.ACTION_TTS_DATA_INSTALLED.equals(intent.getAction())) {
187 mTts = new TextToSpeech(getActivity().getApplicationContext(), mTtsInitListener, in onCreate()
194 new IntentFilter(TextToSpeech.Engine.ACTION_TTS_DATA_INSTALLED), in onCreate()
219 Intent intent = new Intent(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); in checkTtsData()
232 if (resultCode != TextToSpeech.Engine.CHECK_VOICE_DATA_FAIL) { in onActivityResult()
251 TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES); in updateVoiceDetails()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/tts/
DPreferredEngineOptionsPreferenceController.java24 import android.speech.tts.TextToSpeech;
45 private TextToSpeech mTts;
66 for (TextToSpeech.EngineInfo engine : mEnginesHelper.getEngines()) { in onCreateInternal()
72 TextToSpeech.EngineInfo current = mEnginesHelper.getEngineInfo( in onCreateInternal()
95 TextToSpeech.EngineInfo current = mEnginesHelper.getEngineInfo(mTts.getCurrentEngine()); in updateState()
106 private boolean areEnginesEqual(TextToSpeech.EngineInfo engine1, in areEnginesEqual()
107 TextToSpeech.EngineInfo engine2) { in areEnginesEqual()
111 private boolean areEnginesEqual(TextToSpeech.EngineInfo engine, CharSequence name, in areEnginesEqual()
152 if (status == TextToSpeech.SUCCESS) { in onUpdateEngine()
174 TextToSpeech createTts(TextToSpeech.OnInitListener listener, String engine) { in createTts()
[all …]
DTtsPlaybackSettingsManager.java22 import android.speech.tts.TextToSpeech;
68 private final TextToSpeech mTts;
71 TtsPlaybackSettingsManager(Context context, @NonNull TextToSpeech tts, in TtsPlaybackSettingsManager()
87 Settings.Secure.TTS_DEFAULT_RATE, TextToSpeech.Engine.DEFAULT_RATE); in getCurrentSpeechRate()
91 updateSpeechRate(TextToSpeech.Engine.DEFAULT_RATE); in resetSpeechRate()
103 Settings.Secure.TTS_DEFAULT_PITCH, TextToSpeech.Engine.DEFAULT_PITCH); in getCurrentVoicePitch()
107 updateVoicePitch(TextToSpeech.Engine.DEFAULT_PITCH); in resetVoicePitch()
142 boolean success = resultCode != TextToSpeech.LANG_NOT_SUPPORTED in updateTtsLocale()
143 && resultCode != TextToSpeech.LANG_MISSING_DATA; in updateTtsLocale()
155 >= TextToSpeech.LANG_AVAILABLE) { in speakSampleText()
[all …]
DTtsPlaybackPreferenceController.java27 import android.speech.tts.TextToSpeech;
73 private TextToSpeech mTts;
93 final TextToSpeech.OnInitListener mOnInitListener = status -> {
94 if (status == TextToSpeech.SUCCESS) {
198 Intent intent = new Intent(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); in startEngineVoiceDataCheck()
219 Intent intent = new Intent(TextToSpeech.Engine.ACTION_GET_SAMPLE_TEXT); in startGetSampleText()
224 intent.putExtra(TextToSpeech.Engine.KEY_PARAM_LANGUAGE, mSampleTextLocale.getLanguage()); in startGetSampleText()
225 intent.putExtra(TextToSpeech.Engine.KEY_PARAM_COUNTRY, mSampleTextLocale.getCountry()); in startGetSampleText()
226 intent.putExtra(TextToSpeech.Engine.KEY_PARAM_VARIANT, mSampleTextLocale.getVariant()); in startGetSampleText()
245 if (data == null || resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_FAIL) { in onVoiceDataIntegrityCheckDone()
[all …]
DPreferredEngineEntryPreferenceController.java22 import android.speech.tts.TextToSpeech;
60 TextToSpeech.EngineInfo info = mEnginesHelper.getEngineInfo( in onCreateInternal()
77 TextToSpeech.EngineInfo info = mEnginesHelper.getEngineInfo( in updateState()
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/
DTextToSpeechCompat.java17 import android.speech.tts.TextToSpeech;
20 public TextToSpeechCompat(TextToSpeech textToSpeech) { in TextToSpeechCompat()
24 private final TextToSpeech mTextToSpeech;
29 public TextToSpeech.Engine mEngine;
31 public Engine(TextToSpeech.Engine engine) { in Engine()
37 public EngineInfo(TextToSpeech.EngineInfo engineInfo) { in EngineInfo()
42 public TextToSpeech.EngineInfo mEngineInfo;
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowTextToSpeech.java21 import android.speech.tts.TextToSpeech;
30 @Implements(TextToSpeech.class)
33 private static TextToSpeech sInstance;
34 private static TextToSpeech.OnInitListener sOnInitListener;
37 public static void setInstance(TextToSpeech textToSpeech) { in setInstance()
45 public void __constructor__(Context context, TextToSpeech.OnInitListener listener, in __constructor__()
52 public void __constructor__(Context context, TextToSpeech.OnInitListener listener, in __constructor__()
57 public void __constructor__(Context context, TextToSpeech.OnInitListener listener) { in __constructor__()
DShadowTtsEngines.java20 import android.speech.tts.TextToSpeech;
44 protected List<TextToSpeech.EngineInfo> getEngines() { in getEngines()
49 protected TextToSpeech.EngineInfo getEngineInfo(String packageName) { in getEngineInfo()
/packages/apps/Settings/src/com/android/settings/tts/
DTextToSpeechSettings.java32 import android.speech.tts.TextToSpeech;
33 import android.speech.tts.TextToSpeech.EngineInfo;
121 private int mDefaultPitch = TextToSpeech.Engine.DEFAULT_PITCH;
122 private int mDefaultRate = TextToSpeech.Engine.DEFAULT_RATE;
129 private TextToSpeech mTts = null;
153 private final TextToSpeech.OnInitListener mInitListener = this::onInitEngine;
170 getActivity().setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM); in onCreate()
212 Pair<TextToSpeech, Boolean> ttsAndNew = ttsViewModel.getTtsAndWhetherNew(mInitListener); in onCreate()
248 final Pair<TextToSpeech, Boolean> ttsAndNew = in onResume()
261 TextToSpeech.Engine.DEFAULT_PITCH) / 100.0f); in onResume()
[all …]
DTtsEnginePreferenceFragment.java10 import android.speech.tts.TextToSpeech;
11 import android.speech.tts.TextToSpeech.EngineInfo;
38 private TextToSpeech mTts = null;
46 private final TextToSpeech.OnInitListener mUpdateListener =
47 new TextToSpeech.OnInitListener() {
59 mTts = new TextToSpeech(mContext, null); in onCreate()
84 if (status == TextToSpeech.SUCCESS) { in onUpdateEngine()
94 mTts = new TextToSpeech(mContext, null, mPreviousEngine); in onUpdateEngine()
190 mTts = new TextToSpeech(mContext, mUpdateListener, engine); in updateDefaultEngine()
DTextToSpeechViewModel.java20 import android.speech.tts.TextToSpeech;
30 private TextToSpeech mTts;
59 protected Pair<TextToSpeech, Boolean> getTtsAndWhetherNew( in getTtsAndWhetherNew()
60 TextToSpeech.OnInitListener listener) { in getTtsAndWhetherNew()
63 mTts = new TextToSpeech(this.mApplication, listener); in getTtsAndWhetherNew()
/packages/apps/Car/systemlibs/car-assist-client-lib/src/com/android/car/assist/client/tts/
DAndroidTextToSpeechEngine.java22 import android.speech.tts.TextToSpeech;
33 private TextToSpeech mTextToSpeech;
36 public void initialize(Context context, TextToSpeech.OnInitListener initListener) { in initialize()
38 mTextToSpeech = new TextToSpeech(context, initListener); in initialize()
87 return TextToSpeech.Engine.DEFAULT_STREAM; in getStream()
DTextToSpeechHelper.java24 import android.speech.tts.TextToSpeech;
109 mInitStatus = TextToSpeech.STOPPED; in TextToSpeechHelper()
172 if (mInitStatus == TextToSpeech.STOPPED) { in requestPlay()
201 if (mInitStatus == TextToSpeech.ERROR) { in playInternal()
220 if (mTextToSpeechEngine.speak(text, TextToSpeech.QUEUE_ADD, /* params= */ null, in playInternal()
221 utteranceId) != TextToSpeech.SUCCESS) { in playInternal()
254 mInitStatus = TextToSpeech.STOPPED; in shutdownEngine()
/packages/apps/Car/VoiceControl/src/com/android/car/voicecontrol/
DTextToSpeechImpl.java42 public class TextToSpeechImpl implements TextToSpeech {
50 private android.speech.tts.TextToSpeech mTTS;
99 mTTS = new android.speech.tts.TextToSpeech(context, status -> { in TextToSpeechImpl()
101 if (status == android.speech.tts.TextToSpeech.ERROR) { in TextToSpeechImpl()
112 mTTS.speak(text, android.speech.tts.TextToSpeech.QUEUE_ADD, null, ""); in TextToSpeechImpl()
174 mTTS.speak(text, android.speech.tts.TextToSpeech.QUEUE_ADD, null, ""); in doSpeak()
/packages/apps/Car/VoiceControl/src/com/android/car/voicecontrol/actuators/
DNavigationActuator.java24 import com.android.car.voicecontrol.TextToSpeech;
51 private boolean startNavigation(String destination, TextToSpeech tts) { in startNavigation()
59 private boolean cancelNavigation(TextToSpeech tts) { in cancelNavigation()
DSkill.java20 import com.android.car.voicecontrol.TextToSpeech;
47 boolean execute(String[] args, TextToSpeech tts); in execute()
76 boolean tryExecute(String text, TextToSpeech tts) { in tryExecute()
DMediaActuator.java44 import com.android.car.voicecontrol.TextToSpeech;
181 private boolean playSongOnSource(String song, String source, TextToSpeech tts) { in playSongOnSource()
224 private boolean playSongOnDefault(String song, TextToSpeech tts) { in playSongOnDefault()
232 private boolean informCurrentSong(TextToSpeech tts) { in informCurrentSong()
255 private boolean stopCurrentSource(TextToSpeech tts) { in stopCurrentSource()
263 private boolean pauseCurrentSource(TextToSpeech tts) { in pauseCurrentSource()
271 private boolean playCurrentSource(TextToSpeech tts) { in playCurrentSource()
281 TextToSpeech tts) { in executePlaybackAction()
DCommActuator.java36 import com.android.car.voicecontrol.TextToSpeech;
94 private boolean call(String query, TextToSpeech tts) { in call()
160 private void doCall(String number, String name, TextToSpeech tts) { in doCall()
172 private boolean sendSMS(String query, TextToSpeech tts) { in sendSMS()
193 private void doSendSMS(String number, String name, TextToSpeech tts) { in doSendSMS()
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/
DShadowTtsEngines.java20 import android.speech.tts.TextToSpeech;
44 protected List<TextToSpeech.EngineInfo> getEngines() { in getEngines()
49 protected TextToSpeech.EngineInfo getEngineInfo(String packageName) { in getEngineInfo()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertAudio.java56 import android.speech.tts.TextToSpeech;
72 public class CellBroadcastAlertAudio extends Service implements TextToSpeech.OnInitListener,
73 TextToSpeech.OnUtteranceCompletedListener, AudioManager.OnAudioFocusChangeListener {
128 public TextToSpeech mTts;
175 if (status == TextToSpeech.SUCCESS) { in onInit()
206 mTtsLanguageSupported = (result >= TextToSpeech.LANG_AVAILABLE); in setTtsLanguage()
260 int res = TextToSpeech.ERROR; in onCreate()
266 mTts.speak("", TextToSpeech.QUEUE_FLUSH, null, null); in onCreate()
271 if (res != TextToSpeech.SUCCESS) { in onCreate()
430 mTts = new TextToSpeech(this, this); in handleStartIntent()
/packages/apps/Settings/tests/robotests/src/com/android/settings/language/
DTtsPreferenceControllerTest.java26 import android.speech.tts.TextToSpeech;
82 final List<TextToSpeech.EngineInfo> infolist = new ArrayList<>(); in testIsAvailable_ttsEngineInstalled_shouldReturnTrue()
83 infolist.add(mock(TextToSpeech.EngineInfo.class)); in testIsAvailable_ttsEngineInstalled_shouldReturnTrue()

12