1 package org.daisy.pipeline.tts;
2
3 import net.sf.saxon.s9api.QName;
4
5 /**
6 * Transform the SSML according to the TTS engine's features and bugs
7 */
8 public interface SSMLAdapter {
9 String getHeader(String voiceName);
10
11 String getFooter();
12
13 /**
14 * @return null to discard the element
15 */
16 QName adaptElement(QName element);
17
18 /**
19 * @return a clean version of the input text.
20 */
21 String adaptText(String text);
22
23 /**
24 * @return null to discard the attribute
25 */
26 QName adaptAttributeName(QName element, QName attr, String value);
27
28 String adaptAttributeValue(QName element, QName attr, String value);
29 }