Home
last modified time | relevance | path

Searched refs:mTextToSpeech (Results 1 – 4 of 4) sorted by relevance

/aosp12/packages/apps/Car/libs/car-assist-client-lib/src/com/android/car/assist/client/tts/
H A DAndroidTextToSpeechEngine.java33 private TextToSpeech mTextToSpeech; field in AndroidTextToSpeechEngine
37 if (mTextToSpeech == null) { in initialize()
38 mTextToSpeech = new TextToSpeech(context, initListener); in initialize()
44 return mTextToSpeech != null; in isInitialized()
51 mTextToSpeech.setOnUtteranceProgressListener(progressListener); in setOnUtteranceProgressListener()
57 mTextToSpeech.setAudioAttributes(audioAttributes); in setAudioAttributes()
64 return mTextToSpeech.speak(text, queueMode, params, utteranceId); in speak()
70 mTextToSpeech.stop(); in stop()
75 return mTextToSpeech != null && mTextToSpeech.isSpeaking(); in isSpeaking()
81 mTextToSpeech.shutdown(); in shutdown()
[all …]
/aosp12/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/tts/
H A DPreferredEngineOptionsPreferenceControllerTest.java80 private TextToSpeech mTextToSpeech; field in PreferredEngineOptionsPreferenceControllerTest
117 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in onCreate_populatesGroup()
124 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in refreshUi_currentEngineInfoSummarySet()
135 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in refreshUi_otherEngineInfoSummaryEmpty()
145 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in performClick_currentEngine_returnFalse()
155 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in performClick_otherEngine_returnTrue()
165 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in performClick_otherEngine_initSuccess_changeCurrentEngine()
173 when(mTextToSpeech.getCurrentEngine()).thenReturn(OTHER_ENGINE_INFO.name); in performClick_otherEngine_initSuccess_changeCurrentEngine()
181 when(mTextToSpeech.getCurrentEngine()).thenReturn(CURRENT_ENGINE_INFO.name); in performClick_otherEngine_initFail_keepCurrentEngine()
189 when(mTextToSpeech.getCurrentEngine()).thenReturn(OTHER_ENGINE_INFO.name); in performClick_otherEngine_initFail_keepCurrentEngine()
[all …]
H A DTtsPlaybackPreferenceControllerTest.java89 private TextToSpeech mTextToSpeech; field in TtsPlaybackPreferenceControllerTest
128 when(mTextToSpeech.getCurrentEngine()).thenReturn(ENGINE_INFO.name); in setUp()
129 when(mTextToSpeech.getVoice()).thenReturn(VOICE); in setUp()
268 verify(mTextToSpeech).setLanguage(Locale.getDefault()); in defaultLanguage_handlePreferenceChanged_passEmptyValue_setsDefault()
292 verify(mTextToSpeech).setLanguage(Locale.ENGLISH); in defaultLanguage_handlePreferenceChanged_passLocale_setsLocale()
342 verify(mTextToSpeech).setSpeechRate( in speechRate_handlePreferenceChanged_updatesTts()
355 verify(mTextToSpeech).speak(any(), eq(TextToSpeech.QUEUE_FLUSH), isNull(), eq("Sample")); in speechRate_handlePreferenceChanged_speaksSampleText()
381 verify(mTextToSpeech).setPitch( in voicePitch_handlePreferenceChanged_updatesTts()
394 verify(mTextToSpeech).speak(any(), eq(TextToSpeech.QUEUE_FLUSH), isNull(), eq("Sample")); in voicePitch_handlePreferenceChanged_speaksSampleText()
496 return mTextToSpeech; in createTts()
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/
H A DAccessibilityShortcutControllerTest.java121 private @Mock TextToSpeech mTextToSpeech; field in AccessibilityShortcutControllerTest
164 .thenReturn(mTextToSpeech); in setUp()
205 when(mTextToSpeech.getVoice()).thenReturn(mVoice); in setUp()
499 verify(mTextToSpeech).speak(any(), eq(TextToSpeech.QUEUE_FLUSH), any(), any()); in testOnAccessibilityShortcut_showsWarningDialog_shouldTtsSpokenPrompt()
504 verify(mTextToSpeech).shutdown(); in testOnAccessibilityShortcut_showsWarningDialog_shouldTtsSpokenPrompt()
524 verify(mTextToSpeech, times(0)).speak(any(), anyInt(), any(), any()); in testOnAccessibilityShortcut_showsWarningDialog_ttsInitFail_noSpokenPrompt()
541 .when(mTextToSpeech).setLanguage(any()); in testOnAccessibilityShortcut_showsWarningDialog_ttsLongTimeInit_retrySpoken()
549 verify(mTextToSpeech).speak(any(), eq(TextToSpeech.QUEUE_FLUSH), any(), any()); in testOnAccessibilityShortcut_showsWarningDialog_ttsLongTimeInit_retrySpoken()
554 verify(mTextToSpeech).shutdown(); in testOnAccessibilityShortcut_showsWarningDialog_ttsLongTimeInit_retrySpoken()