EspeakParameters.java
package server.restful.common.text2speech;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import java.io.File;
@SuppressWarnings({"CanBeFinal", "FieldMayBeFinal", "FieldCanBeLocal"})
@Parameters(commandNames = {"espeak"})
public class EspeakParameters {
@Parameter(names = "-m", arity = 0, description = "Interpret SSML markup, and ignore other < > tags", order = 0)
private boolean interpretSsml = true;
@Parameter(names = "-k", description = "Indicate capital letters with: 1=sound, 2=the word \"capitals\", higher values indicate a pitch increase (try -k20).", order = 1)
private int pitchIncrease = 20;
@Parameter(names = "-a", description = "Amplitude, 0 to 200, default is 100", order = 2)
private int volume = 100;
@Parameter(names = "-w", description = "Write speech to this WAV file, rather than speaking it directly", order = 3)
private File outputFile;
@Parameter(description = "ssml")
private String ssml;
public EspeakParameters(int volume, String ssml, File outputFile) {
this.volume = volume;
this.ssml = ssml;
this.outputFile = outputFile;
}
}