test_class.declarator: activity
test_class.modifier: private
test_class.original_string: private Activity activity;
test_class.type: Activity
test_class.var_name: activity
test_class.declarator: speakerbox
test_class.modifier: private
test_class.original_string: private Speakerbox speakerbox;
test_class.type: Speakerbox
test_class.var_name: speakerbox
test_class.declarator: shadowTextToSpeech
test_class.modifier: private
test_class.original_string: private com.mapzen.speakerbox.ShadowTextToSpeech shadowTextToSpeech;
test_class.type: com.mapzen.speakerbox.ShadowTextToSpeech
test_class.var_name: shadowTextToSpeech
test_class.file: library/src/test/java/com/mapzen/speakerbox/SpeakerboxTest.java
test_class.identifier: SpeakerboxTest
test_case.body: @Test
      public void shouldPlayCharacterSequence() throws Exception {
          CharSequence expected = "Hello";
          speakerbox.play(expected);
          assertThat(shadowTextToSpeech.getLastSpokenText()).isEqualTo(expected.toString());
      }
test_case.class_method_signature: SpeakerboxTest.shouldPlayCharacterSequence()
test_case.full_signature: @Test public void shouldPlayCharacterSequence()
test_case.identifier: shouldPlayCharacterSequence
test_case.invocations: play isEqualTo assertThat getLastSpokenText toString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldPlayCharacterSequence()
focal_class.declarator: TAG = Speakerbox.class.getSimpleName()
focal_class.modifier: final static
focal_class.original_string: final static String TAG = Speakerbox.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: FOCUS_PITCH = 1.0f
focal_class.modifier: private static final
focal_class.original_string: private static final float FOCUS_PITCH = 1.0f;
focal_class.type: float
focal_class.var_name: FOCUS_PITCH
focal_class.declarator: DUCK_PITCH = 0.5f
focal_class.modifier: private static final
focal_class.original_string: private static final float DUCK_PITCH = 0.5f;
focal_class.type: float
focal_class.var_name: DUCK_PITCH
focal_class.declarator: UTTERANCE_ID_NONE = "-1"
focal_class.modifier: public static final
focal_class.original_string: public static final String UTTERANCE_ID_NONE = "-1";
focal_class.type: String
focal_class.var_name: UTTERANCE_ID_NONE
focal_class.declarator: textToSpeech
focal_class.modifier: private final
focal_class.original_string: private final TextToSpeech textToSpeech;
focal_class.type: TextToSpeech
focal_class.var_name: textToSpeech
focal_class.declarator: application
focal_class.modifier: private final
focal_class.original_string: private final Application application;
focal_class.type: Application
focal_class.var_name: application
focal_class.declarator: callbacks
focal_class.modifier: private final
focal_class.original_string: private final Application.ActivityLifecycleCallbacks callbacks;
focal_class.type: Application.ActivityLifecycleCallbacks
focal_class.var_name: callbacks
focal_class.declarator: activity = null
focal_class.modifier: private
focal_class.original_string: private Activity activity = null;
focal_class.type: Activity
focal_class.var_name: activity
focal_class.declarator: initialized = false
focal_class.modifier: private
focal_class.original_string: private boolean initialized = false;
focal_class.type: boolean
focal_class.var_name: initialized
focal_class.declarator: muted = false
focal_class.modifier: private
focal_class.original_string: private boolean muted = false;
focal_class.type: boolean
focal_class.var_name: muted
focal_class.declarator: playOnInit = null
focal_class.modifier: private
focal_class.original_string: private String playOnInit = null;
focal_class.type: String
focal_class.var_name: playOnInit
focal_class.declarator: queueMode = TextToSpeech.QUEUE_FLUSH
focal_class.modifier: private
focal_class.original_string: private int queueMode = TextToSpeech.QUEUE_FLUSH;
focal_class.type: int
focal_class.var_name: queueMode
focal_class.declarator: samples = new LinkedHashMap<String, String>()
focal_class.modifier: private final
focal_class.original_string: private final LinkedHashMap<String, String> samples = new LinkedHashMap<String, String>();
focal_class.type: LinkedHashMap<String, String>
focal_class.var_name: samples
focal_class.declarator: unwantedPhrases = new ArrayList<String>()
focal_class.modifier: private final
focal_class.original_string: private final ArrayList<String> unwantedPhrases = new ArrayList<String>();
focal_class.type: ArrayList<String>
focal_class.var_name: unwantedPhrases
focal_class.declarator: onStartRunnables = new HashMap<String, Runnable>()
focal_class.modifier: private
focal_class.original_string: private HashMap<String, Runnable> onStartRunnables = new HashMap<String, Runnable>();
focal_class.type: HashMap<String, Runnable>
focal_class.var_name: onStartRunnables
focal_class.declarator: onDoneRunnables = new HashMap<String, Runnable>()
focal_class.modifier: private
focal_class.original_string: private HashMap<String, Runnable> onDoneRunnables = new HashMap<String, Runnable>();
focal_class.type: HashMap<String, Runnable>
focal_class.var_name: onDoneRunnables
focal_class.declarator: onErrorRunnables = new HashMap<String, Runnable>()
focal_class.modifier: private
focal_class.original_string: private HashMap<String, Runnable> onErrorRunnables = new HashMap<String, Runnable>();
focal_class.type: HashMap<String, Runnable>
focal_class.var_name: onErrorRunnables
focal_class.declarator: audioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() {
          public void onAudioFocusChange(int focusChange) {
              switch (focusChange) {
                  case AudioManager.AUDIOFOCUS_GAIN:
                      textToSpeech.setPitch(FOCUS_PITCH);
                      break;
                  case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
                      textToSpeech.setPitch(DUCK_PITCH);
                      break;
              }
          }
      }
focal_class.original_string: AudioManager.OnAudioFocusChangeListener audioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() {
          public void onAudioFocusChange(int focusChange) {
              switch (focusChange) {
                  case AudioManager.AUDIOFOCUS_GAIN:
                      textToSpeech.setPitch(FOCUS_PITCH);
                      break;
                  case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
                      textToSpeech.setPitch(DUCK_PITCH);
                      break;
              }
          }
      };
focal_class.type: AudioManager.OnAudioFocusChangeListener
focal_class.var_name: audioFocusChangeListener
focal_class.declarator: utteranceProgressListener = new UtteranceProgressListener() {
          @Override
          public void onStart(String utteranceId) {
              detectAndRun(utteranceId, onStartRunnables);
          }
  
          @Override
          public void onDone(String utteranceId) {
              if (detectAndRun(utteranceId, onDoneRunnables)) {
                  // because either onDone or onError will be called for an utteranceId, cleanup other
                  if (onErrorRunnables.containsKey(utteranceId)) {
                      onErrorRunnables.remove(utteranceId);
                  }
              }
          }
  
          @Override
          public void onError(String utteranceId) {
              if (detectAndRun(utteranceId, onErrorRunnables)) {
                  // because either onDone or onError will be called for an utteranceId, cleanup other
                  if (onDoneRunnables.containsKey(utteranceId)) {
                      onDoneRunnables.remove(utteranceId);
                  }
              }
          }
      }
focal_class.original_string: UtteranceProgressListener utteranceProgressListener = new UtteranceProgressListener() {
          @Override
          public void onStart(String utteranceId) {
              detectAndRun(utteranceId, onStartRunnables);
          }
  
          @Override
          public void onDone(String utteranceId) {
              if (detectAndRun(utteranceId, onDoneRunnables)) {
                  // because either onDone or onError will be called for an utteranceId, cleanup other
                  if (onErrorRunnables.containsKey(utteranceId)) {
                      onErrorRunnables.remove(utteranceId);
                  }
              }
          }
  
          @Override
          public void onError(String utteranceId) {
              if (detectAndRun(utteranceId, onErrorRunnables)) {
                  // because either onDone or onError will be called for an utteranceId, cleanup other
                  if (onDoneRunnables.containsKey(utteranceId)) {
                      onDoneRunnables.remove(utteranceId);
                  }
              }
          }
      };
focal_class.type: UtteranceProgressListener
focal_class.var_name: utteranceProgressListener
focal_class.file: library/src/main/java/com/mapzen/speakerbox/Speakerbox.java
focal_class.identifier: Speakerbox
focal_class.interfaces: implements TextToSpeech.OnInitListener
focal_class.class_method_signature: Speakerbox.Speakerbox(final Application application)
focal_class.full_signature: public  Speakerbox(final Application application)
focal_class.identifier: Speakerbox
focal_class.modifiers: public
focal_class.parameters: (final Application application)
focal_class.signature:  Speakerbox(final Application application)
focal_class.class_method_signature: Speakerbox.onInit(int status)
focal_class.full_signature: @Override public void onInit(int status)
focal_class.identifier: onInit
focal_class.modifiers: @Override public
focal_class.parameters: (int status)
focal_class.return: void
focal_class.signature: void onInit(int status)
focal_class.class_method_signature: Speakerbox.setActivity(Activity activity)
focal_class.full_signature: public void setActivity(Activity activity)
focal_class.identifier: setActivity
focal_class.modifiers: public
focal_class.parameters: (Activity activity)
focal_class.return: void
focal_class.signature: void setActivity(Activity activity)
focal_class.class_method_signature: Speakerbox.getCallbacks()
focal_class.full_signature: public Application.ActivityLifecycleCallbacks getCallbacks()
focal_class.identifier: getCallbacks
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Application.ActivityLifecycleCallbacks
focal_class.signature: Application.ActivityLifecycleCallbacks getCallbacks()
focal_class.class_method_signature: Speakerbox.play(CharSequence text)
focal_class.full_signature: public void play(CharSequence text)
focal_class.identifier: play
focal_class.modifiers: public
focal_class.parameters: (CharSequence text)
focal_class.return: void
focal_class.signature: void play(CharSequence text)
focal_class.class_method_signature: Speakerbox.playAndOnStart(String text, Runnable onStart)
focal_class.full_signature: public void playAndOnStart(String text, Runnable onStart)
focal_class.identifier: playAndOnStart
focal_class.modifiers: public
focal_class.parameters: (String text, Runnable onStart)
focal_class.return: void
focal_class.signature: void playAndOnStart(String text, Runnable onStart)
focal_class.class_method_signature: Speakerbox.playAndOnDone(String text, Runnable onDone)
focal_class.full_signature: public void playAndOnDone(String text, Runnable onDone)
focal_class.identifier: playAndOnDone
focal_class.modifiers: public
focal_class.parameters: (String text, Runnable onDone)
focal_class.return: void
focal_class.signature: void playAndOnDone(String text, Runnable onDone)
focal_class.class_method_signature: Speakerbox.playAndOnError(String text, Runnable onError)
focal_class.full_signature: public void playAndOnError(String text, Runnable onError)
focal_class.identifier: playAndOnError
focal_class.modifiers: public
focal_class.parameters: (String text, Runnable onError)
focal_class.return: void
focal_class.signature: void playAndOnError(String text, Runnable onError)
focal_class.class_method_signature: Speakerbox.play(String text, Runnable onStart, Runnable onDone, Runnable onError)
focal_class.full_signature: public void play(String text, Runnable onStart, Runnable onDone, Runnable onError)
focal_class.identifier: play
focal_class.modifiers: public
focal_class.parameters: (String text, Runnable onStart, Runnable onDone, Runnable onError)
focal_class.return: void
focal_class.signature: void play(String text, Runnable onStart, Runnable onDone, Runnable onError)
focal_class.class_method_signature: Speakerbox.stop()
focal_class.full_signature: public void stop()
focal_class.identifier: stop
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: Speakerbox.applyRemixes(String text)
focal_class.full_signature: private String applyRemixes(String text)
focal_class.identifier: applyRemixes
focal_class.modifiers: private
focal_class.parameters: (String text)
focal_class.return: String
focal_class.signature: String applyRemixes(String text)
focal_class.class_method_signature: Speakerbox.playInternal(String text, String utteranceId)
focal_class.full_signature: private void playInternal(String text, String utteranceId)
focal_class.identifier: playInternal
focal_class.modifiers: private
focal_class.parameters: (String text, String utteranceId)
focal_class.return: void
focal_class.signature: void playInternal(String text, String utteranceId)
focal_class.class_method_signature: Speakerbox.dontPlayIfContains(String text)
focal_class.full_signature: public void dontPlayIfContains(String text)
focal_class.identifier: dontPlayIfContains
focal_class.modifiers: public
focal_class.parameters: (String text)
focal_class.return: void
focal_class.signature: void dontPlayIfContains(String text)
focal_class.class_method_signature: Speakerbox.doesNotContainUnwantedPhrase(String text)
focal_class.full_signature: private boolean doesNotContainUnwantedPhrase(String text)
focal_class.identifier: doesNotContainUnwantedPhrase
focal_class.modifiers: private
focal_class.parameters: (String text)
focal_class.return: boolean
focal_class.signature: boolean doesNotContainUnwantedPhrase(String text)
focal_class.class_method_signature: Speakerbox.mute()
focal_class.full_signature: public void mute()
focal_class.identifier: mute
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void mute()
focal_class.class_method_signature: Speakerbox.unmute()
focal_class.full_signature: public void unmute()
focal_class.identifier: unmute
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unmute()
focal_class.class_method_signature: Speakerbox.isMuted()
focal_class.full_signature: public boolean isMuted()
focal_class.identifier: isMuted
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isMuted()
focal_class.class_method_signature: Speakerbox.remix(String original, String remix)
focal_class.full_signature: public void remix(String original, String remix)
focal_class.identifier: remix
focal_class.modifiers: public
focal_class.parameters: (String original, String remix)
focal_class.return: void
focal_class.signature: void remix(String original, String remix)
focal_class.class_method_signature: Speakerbox.getTextToSpeech()
focal_class.full_signature: public TextToSpeech getTextToSpeech()
focal_class.identifier: getTextToSpeech
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TextToSpeech
focal_class.signature: TextToSpeech getTextToSpeech()
focal_class.class_method_signature: Speakerbox.requestAudioFocus()
focal_class.full_signature: public void requestAudioFocus()
focal_class.identifier: requestAudioFocus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void requestAudioFocus()
focal_class.class_method_signature: Speakerbox.abandonAudioFocus()
focal_class.full_signature: public void abandonAudioFocus()
focal_class.identifier: abandonAudioFocus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void abandonAudioFocus()
focal_class.class_method_signature: Speakerbox.enableVolumeControl(Activity activity)
focal_class.full_signature: public void enableVolumeControl(Activity activity)
focal_class.identifier: enableVolumeControl
focal_class.modifiers: public
focal_class.parameters: (Activity activity)
focal_class.return: void
focal_class.signature: void enableVolumeControl(Activity activity)
focal_class.class_method_signature: Speakerbox.disableVolumeControl(Activity activity)
focal_class.full_signature: public void disableVolumeControl(Activity activity)
focal_class.identifier: disableVolumeControl
focal_class.modifiers: public
focal_class.parameters: (Activity activity)
focal_class.return: void
focal_class.signature: void disableVolumeControl(Activity activity)
focal_class.class_method_signature: Speakerbox.setQueueMode(int queueMode)
focal_class.full_signature: public void setQueueMode(int queueMode)
focal_class.identifier: setQueueMode
focal_class.modifiers: public
focal_class.parameters: (int queueMode)
focal_class.return: void
focal_class.signature: void setQueueMode(int queueMode)
focal_class.class_method_signature: Speakerbox.getAvailableLanguages()
focal_class.full_signature: @TargetApi(Build.VERSION_CODES.LOLLIPOP) public Set<Locale> getAvailableLanguages()
focal_class.identifier: getAvailableLanguages
focal_class.modifiers: @TargetApi(Build.VERSION_CODES.LOLLIPOP) public
focal_class.parameters: ()
focal_class.return: Set<Locale>
focal_class.signature: Set<Locale> getAvailableLanguages()
focal_class.class_method_signature: Speakerbox.setLanguage(Locale locale)
focal_class.full_signature: public void setLanguage(Locale locale)
focal_class.identifier: setLanguage
focal_class.modifiers: public
focal_class.parameters: (Locale locale)
focal_class.return: void
focal_class.signature: void setLanguage(Locale locale)
focal_class.class_method_signature: Speakerbox.shutdown()
focal_class.full_signature: public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: Speakerbox.detectAndRun(String utteranceId, HashMap<String, Runnable> hashMap)
focal_class.full_signature: private boolean detectAndRun(String utteranceId, HashMap<String, Runnable> hashMap)
focal_class.identifier: detectAndRun
focal_class.modifiers: private
focal_class.parameters: (String utteranceId, HashMap<String, Runnable> hashMap)
focal_class.return: boolean
focal_class.signature: boolean detectAndRun(String utteranceId, HashMap<String, Runnable> hashMap)
focal_method.body: public void play(CharSequence text) {
          play(text.toString(), null, null, null);
      }
focal_method.class_method_signature: Speakerbox.play(CharSequence text)
focal_method.full_signature: public void play(CharSequence text)
focal_method.identifier: play
focal_method.invocations: play toString
focal_method.modifiers: public
focal_method.parameters: (CharSequence text)
focal_method.return: void
focal_method.signature: void play(CharSequence text)