Search code examples
androidtext-to-speech

Difference between TextToSpeech.addEarcon() and TextToSpeech.addSpeech()


I just started working on Android's TextToSpeech API and I came accros two methods which seem to be exactly the same namely:

TextToSpeech.addEarcon() : Adds a mapping between a string of text and a sound resource in a package. Use this to add custom earcons.

and

TextToSpeech.addSpeech() : Adds a mapping between a string of text and a sound resource in a package. After a call to this method, subsequent calls to speak(java.lang.CharSequence, int, android.os.Bundle, java.lang.String) will play the specified sound resource if it is available, or synthesize the text it is missing.


Solution

  • So while writing the question I did a bit more research and turns out an Earcon is a term going back to 1985:

    A brief, distinctive sound that represents a specific event or conveys other information. Earcons are a common feature of computer operating systems and applications, ranging from a simple beep to indicate an error, to the customizable sound schemes of modern operating systems that indicate startup, shutdown, and other events - Wikipedia

    Never would've guessed Earcon as a word/term.