public class TextToSpeechTest extends WatsonServiceUnitTest
DELETE, GET, POST, PUT, serverCONTENT_TYPE, PLACEHOLDER, properties| Constructor and Description |
|---|
TextToSpeechTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp()
Setups and starts the mock server.
|
void |
testGetVoice()
Test get voice.
|
void |
testGetVoices()
Test get voices.
|
void |
testSynthesize()
Test synthesize.
|
void |
testSynthesizeAndFixHeader()
Test the fix wave header not having the size due to be streamed.
|
void |
testVoiceClass()
Tests the static method Voice.getByName.
|
void |
testWithVoiceAsWav()
Test with voice as AudioFormat.WAV.
|
getMockWebServerUrl, jsonResponse, tearDowngetDefaultHeaders, getProperty, getStringFromInputStream, loadFixture, writeInputStreamToFilepublic void setUp()
throws java.lang.Exception
WatsonServiceUnitTestsetUp in class WatsonServiceUnitTestjava.lang.Exception - the exceptionpublic void testGetVoices()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testGetVoice()
public void testSynthesize()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException - Signals that an I/O exception has occurred.java.lang.InterruptedException - the interrupted exceptionpublic void testWithVoiceAsWav()
public void testSynthesizeAndFixHeader()
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException - Signals that an I/O exception has occurred.javax.sound.sampled.UnsupportedAudioFileException - the unsupported audio file exceptionpublic void testVoiceClass()
throws java.lang.IllegalAccessException
java.lang.IllegalAccessException - the illegal access exception