public class SpeechToText extends WatsonService
VERSION| Constructor and Description |
|---|
SpeechToText()
Instantiates a new speech to text.
|
| Modifier and Type | Method and Description |
|---|---|
SpeechSession |
createSession()
Create a session to lock an engine to the session.
|
SpeechSession |
createSession(SpeechModel model)
Create a session to lock an engine to the session.
|
SpeechSession |
createSession(String model)
Create a session to lock an engine to the session.
|
void |
deleteSession(SpeechSession session)
Delete a session.
|
SpeechModel |
getModel(String name)
Gets the speech model.
|
List<SpeechModel> |
getModels()
Gets the models.
|
SessionStatus |
getRecognizeStatus(SpeechSession session)
Gets the session status.
|
SpeechResults |
recognize(File audio)
Recognizes an audio file and returns
SpeechResults. |
SpeechResults |
recognize(File audio,
String contentType)
Recognizes an audio file and returns
SpeechResults. |
SpeechResults |
recognize(File audio,
String contentType,
RecognizeOptions options)
Recognizes an audio file and returns
SpeechResults. |
configureHttpClient, execute, executeRequest, executeWithoutResponse, getApiKey, getEndPoint, getName, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic SpeechSession createSession()
SpeechSessionpublic SpeechSession createSession(SpeechModel model)
model - the modelSpeechSessionpublic SpeechSession createSession(String model)
model - the modelSpeechSessionpublic void deleteSession(SpeechSession session)
session - the speech sessionpublic SpeechModel getModel(String name)
name - the namepublic List<SpeechModel> getModels()
public SessionStatus getRecognizeStatus(SpeechSession session)
recognize(File, String, RecognizeOptions)
.session - the speech sessionpublic SpeechResults recognize(File audio)
SpeechResults. It will try to recognize the audio
format based on the file extension.audio - the audio fileSpeechResultspublic SpeechResults recognize(File audio, String contentType)
SpeechResults.audio - the audio filecontentType - the media type of the audio. If you use the audio/l16 MIME type, specify the
rate and channels.SpeechResultspublic SpeechResults recognize(File audio, String contentType, RecognizeOptions options)
SpeechResults.audio - the audio filecontentType - the media type of the audio. If you use the audio/l16 MIME type, specify the
rate and channels.options - the RecognizeOptionsSpeechResultsCopyright © 2015–2016. All rights reserved.