/** * Combine the elements of the given string array into a single string, containing one array element per line. * * @param stringArray * stringArray * @return toString(stringArray, 0) */ public static String toString(String[] stringArray) { return toString(stringArray, 0); }
/** * Combine the elements of the given string array into a single string, containing one array element per line. * * @param stringArray * stringArray * @param startIndex * startIndex * @return toString(stringArray, startIndex, stringArray.length - 1) */ public static String toString(String[] stringArray, int startIndex) { return toString(stringArray, startIndex, stringArray.length - 1); }
/** * Combine the elements of the given string array into a single string, containing one array element per line. * * @param stringArray * stringArray * @return toString(stringArray, 0) */ public static String toString(String[] stringArray) { return toString(stringArray, 0); }
/** * Combine the elements of the given string array into a single string, containing one array element per line. * * @param stringArray * stringArray * @param startIndex * startIndex * @return toString(stringArray, startIndex, stringArray.length - 1) */ public static String toString(String[] stringArray, int startIndex) { return toString(stringArray, startIndex, stringArray.length - 1); }
public static InputStream toInputStream(String[] stringArray, int startIndex, int endIndex) { String str = toString(stringArray, startIndex, endIndex); return toInputStream(str); }
public static InputStream toInputStream(String[] stringArray, int startIndex, int endIndex) { String str = toString(stringArray, startIndex, endIndex); return toInputStream(str); }
/** * For the voice with the given name, return the list of styles supported by this voice, if any, one style per line. These * values can be used as the global "style" value in a synthesis request, or in the "style" attribute of the MaryXML prosody * element. * * @param voiceName * voiceName * @return the list of styles, or the empty string if the voice does not support styles. */ public static String getStyles(String voiceName) { Voice v = Voice.getVoice(voiceName); String[] styles = null; if (v != null) { styles = v.getStyles(); } if (styles != null) { return StringUtils.toString(styles); } return ""; }
/** * For the voice with the given name, return the list of styles supported by this voice, if any, one style per line. These * values can be used as the global "style" value in a synthesis request, or in the "style" attribute of the MaryXML prosody * element. * * @param voiceName * voiceName * @return the list of styles, or the empty string if the voice does not support styles. */ public static String getStyles(String voiceName) { Voice v = Voice.getVoice(voiceName); String[] styles = null; if (v != null) { styles = v.getStyles(); } if (styles != null) { return StringUtils.toString(styles); } return ""; }
/** * For the voice with the given name, return the list of vocalizations supported by this voice, one vocalization per line. * These values can be used in the "name" attribute of the vocalization tag. * * @param voiceName * voiceName * @return the list of vocalizations, or the empty string if the voice does not support vocalizations. */ public static String getVocalizations(String voiceName) { Voice v = Voice.getVoice(voiceName); if (v == null || !v.hasVocalizationSupport()) { return ""; } VocalizationSynthesizer vs = v.getVocalizationSynthesizer(); assert vs != null; String[] vocalizations = vs.listAvailableVocalizations(); assert vocalizations != null; return StringUtils.toString(vocalizations); }
/** * For the voice with the given name, return the list of vocalizations supported by this voice, one vocalization per line. * These values can be used in the "name" attribute of the vocalization tag. * * @param voiceName * voiceName * @return the list of vocalizations, or the empty string if the voice does not support vocalizations. */ public static String getVocalizations(String voiceName) { Voice v = Voice.getVoice(voiceName); if (v == null || !v.hasVocalizationSupport()) { return ""; } VocalizationSynthesizer vs = v.getVocalizationSynthesizer(); assert vs != null; String[] vocalizations = vs.listAvailableVocalizations(); assert vocalizations != null; return StringUtils.toString(vocalizations); }
/** * For the voice with the given name, return the list of styles supported by this voice, if any, one style per line. These * values can be used as the global "style" value in a synthesis request, or in the "style" attribute of the MaryXML prosody * element. * * @param voiceName * voiceName * @return the list of styles, or the empty string if the voice does not support styles. */ public static String getStyles(String voiceName) { Voice v = Voice.getVoice(voiceName); String[] styles = null; if (v != null) { styles = v.getStyles(); } if (styles != null) { return StringUtils.toString(styles); } return ""; }
/** * For the voice with the given name, return the list of vocalizations supported by this voice, one vocalization per line. * These values can be used in the "name" attribute of the vocalization tag. * * @param voiceName * voiceName * @return the list of vocalizations, or the empty string if the voice does not support vocalizations. */ public static String getVocalizations(String voiceName) { Voice v = Voice.getVoice(voiceName); if (v == null || !v.hasVocalizationSupport()) { return ""; } VocalizationSynthesizer vs = v.getVocalizationSynthesizer(); assert vs != null; String[] vocalizations = vs.listAvailableVocalizations(); assert vocalizations != null; return StringUtils.toString(vocalizations); }