@Test public void shouldPlayString() throws Exception { String expected = "Hello"; speakerbox.play(expected); assertThat(shadowTextToSpeech.getLastSpokenText()).isEqualTo(expected); }
public void play(CharSequence text) { play(text.toString(), null, null, null); }
Speakerbox implements TextToSpeech.OnInitListener { public void play(CharSequence text) { play(text.toString(), null, null, null); } }
Speakerbox implements TextToSpeech.OnInitListener { public void play(CharSequence text) { play(text.toString(), null, null, null); } Speakerbox(final Application application); }
Speakerbox implements TextToSpeech.OnInitListener { public void play(CharSequence text) { play(text.toString(), null, null, null); } Speakerbox(final Application application); @Override void onInit(int status); void setActivity(Activity activity); Application.ActivityLifecycleCallbacks getCallbacks(); void play(CharSequence text); void playAndOnStart(String text, Runnable onStart); void playAndOnDone(String text, Runnable onDone); void playAndOnError(String text, Runnable onError); void play(String text, Runnable onStart, Runnable onDone, Runnable onError); void stop(); void dontPlayIfContains(String text); void mute(); void unmute(); boolean isMuted(); void remix(String original, String remix); TextToSpeech getTextToSpeech(); void requestAudioFocus(); void abandonAudioFocus(); void enableVolumeControl(Activity activity); void disableVolumeControl(Activity activity); void setQueueMode(int queueMode); @TargetApi(Build.VERSION_CODES.LOLLIPOP) Set<Locale> getAvailableLanguages(); void setLanguage(Locale locale); void shutdown(); }
Speakerbox implements TextToSpeech.OnInitListener { public void play(CharSequence text) { play(text.toString(), null, null, null); } Speakerbox(final Application application); @Override void onInit(int status); void setActivity(Activity activity); Application.ActivityLifecycleCallbacks getCallbacks(); void play(CharSequence text); void playAndOnStart(String text, Runnable onStart); void playAndOnDone(String text, Runnable onDone); void playAndOnError(String text, Runnable onError); void play(String text, Runnable onStart, Runnable onDone, Runnable onError); void stop(); void dontPlayIfContains(String text); void mute(); void unmute(); boolean isMuted(); void remix(String original, String remix); TextToSpeech getTextToSpeech(); void requestAudioFocus(); void abandonAudioFocus(); void enableVolumeControl(Activity activity); void disableVolumeControl(Activity activity); void setQueueMode(int queueMode); @TargetApi(Build.VERSION_CODES.LOLLIPOP) Set<Locale> getAvailableLanguages(); void setLanguage(Locale locale); void shutdown(); static final String UTTERANCE_ID_NONE; }