public class SpeechToText extends WatsonService
| Constructor and Description |
|---|
SpeechToText()
Instantiates a new speech to text.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createSession()
Create a session to lock an engine to the session.
|
void |
deleteSession(String sessionId)
Delete a session.
|
SpeechModel |
getModel(SpeechModel watsonModel)
Gets the model.
|
SpeechModel |
getModel(String name)
Gets the model.
|
List<SpeechModel> |
getModels()
Gets the models.
|
SpeechResults |
recognize(File audio,
String contentType)
Recognize.
|
SpeechResults |
recognize(File audio,
String contentType,
String session,
boolean continuous)
Recognize.
|
execute, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getGson, getHttpClient, setApiKey, setEndPoint, setUsernameAndPassword, toStringpublic SpeechModel getModel(String name)
name - the namepublic String createSession()
public void deleteSession(String sessionId)
sessionId - the session idpublic List<SpeechModel> getModels()
public SpeechResults recognize(File audio, String contentType)
audio - the audiocontentType - the content typepublic SpeechResults recognize(File audio, String contentType, String session, boolean continuous)
audio - the audiocontentType - the content typesession - the sessioncontinuous - the continuouspublic SpeechModel getModel(SpeechModel watsonModel)
watsonModel - the watson modelCopyright © 2015. All rights reserved.