/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/tts/ |
D | TtsPlaybackPreferenceControllerTest.java | 31 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 …]
|
D | TtsPlaybackSettingsManagerTest.java | 31 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 …]
|
D | PreferredEngineOptionsPreferenceControllerTest.java | 28 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/ |
D | TextToSpeechFragment.java | 28 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 …]
|
D | TtsEngineSettingsFragment.java | 28 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/ |
D | PreferredEngineOptionsPreferenceController.java | 24 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 …]
|
D | TtsPlaybackSettingsManager.java | 22 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 …]
|
D | TtsPlaybackPreferenceController.java | 27 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 …]
|
D | PreferredEngineEntryPreferenceController.java | 22 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/ |
D | TextToSpeechCompat.java | 17 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/ |
D | ShadowTextToSpeech.java | 21 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__()
|
D | ShadowTtsEngines.java | 20 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/ |
D | TextToSpeechSettings.java | 32 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 …]
|
D | TtsEnginePreferenceFragment.java | 10 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()
|
D | TextToSpeechViewModel.java | 20 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/ |
D | AndroidTextToSpeechEngine.java | 22 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()
|
D | TextToSpeechHelper.java | 24 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/ |
D | TextToSpeechImpl.java | 42 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/ |
D | NavigationActuator.java | 24 import com.android.car.voicecontrol.TextToSpeech; 51 private boolean startNavigation(String destination, TextToSpeech tts) { in startNavigation() 59 private boolean cancelNavigation(TextToSpeech tts) { in cancelNavigation()
|
D | Skill.java | 20 import com.android.car.voicecontrol.TextToSpeech; 47 boolean execute(String[] args, TextToSpeech tts); in execute() 76 boolean tryExecute(String text, TextToSpeech tts) { in tryExecute()
|
D | MediaActuator.java | 44 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()
|
D | CommActuator.java | 36 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/ |
D | ShadowTtsEngines.java | 20 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/ |
D | CellBroadcastAlertAudio.java | 56 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/ |
D | TtsPreferenceControllerTest.java | 26 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()
|