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, toString
public SpeechSession createSession()
SpeechSession
public SpeechSession createSession(SpeechModel model)
model
- the modelSpeechSession
public SpeechSession createSession(String model)
model
- the modelSpeechSession
public 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 fileSpeechResults
public 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.SpeechResults
public 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 RecognizeOptions
SpeechResults
Copyright © 2015–2016. All rights reserved.