Rework the 'Punctuation level' (now 'Speak punctuation') preference to include a custom punctuation list.

This commit is contained in:
Reece H. Dunn
2013-09-05 14:06:57 +01:00
parent bc346db22e
commit 1de60cdc15
10 changed files with 289 additions and 27 deletions
@@ -193,14 +193,18 @@ public class SpeechSynthesis {
}
}
public void setPunctuationCharacters(String characters) {
nativeSetPunctuationCharacters(characters);
}
/** Don't announce any punctuation characters. */
public static int PUNCT_NONE = 0;
public static final int PUNCT_NONE = 0;
/** Announce every punctuation character. */
public static int PUNCT_ALL = 1;
public static final int PUNCT_ALL = 1;
/** Announce some of the punctuation characters. */
public static int PUNCT_SOME = 2;
public static final int PUNCT_SOME = 2;
public enum UnitType {
Percentage,
@@ -345,6 +349,8 @@ public class SpeechSynthesis {
private native final int nativeGetParameter(int parameter, int current);
private native final boolean nativeSetPunctuationCharacters(String characters);
private native final boolean nativeSynthesize(String text, boolean isSsml);
private native final boolean nativeStop();