Package dev.enola.common.text
Class PronounceableText
java.lang.Object
dev.enola.common.text.LangString
dev.enola.common.text.PronounceableText
PronounceableText is a
LangString plus a phonetic representation.
For example, the English word "hello" would be represented as "hello" and "həˈləʊ".
This allows it to be correctly pronounced by a text-to-speech synthesis engine, such as e.g. the (venerable!) eSpeak (try it e.g. on itinerarium's phoneme-synthesis), or Google Cloud Text-to-Speech AI or Amazon Polly (try it e.g. on ipa-reader.com), etc.
Both the idea and the specific class name PronounceableText were directly
inspired by the https://schema.org/PronounceableText.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static PronounceableTextof(String text, Locale language, String phonetic, SpeechMarkupForm phoneticForm) phonetic()toString()
-
Method Details
-
of
public static PronounceableText of(String text, Locale language, String phonetic, SpeechMarkupForm phoneticForm) -
phonetic
-
phoneticForm
-
toString
- Overrides:
toStringin classLangString
-
hashCode
- Overrides:
hashCodein classLangString
-
equals
- Overrides:
equalsin classLangString
-