public class SpeechToText extends WatsonService
defaultHeaders, JSON_MIME_PATTERN, JSON_PATCH_MIME_PATTERN, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
SpeechToText()
Instantiates a new `SpeechToText`.
|
SpeechToText(IamOptions iamOptions)
Instantiates a new `SpeechToText` with IAM.
|
SpeechToText(java.lang.String username,
java.lang.String password)
Instantiates a new `SpeechToText` with username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<java.lang.Void> |
addAudio(AddAudioOptions addAudioOptions)
Add an audio resource.
|
ServiceCall<java.lang.Void> |
addCorpus(AddCorpusOptions addCorpusOptions)
Add a corpus.
|
ServiceCall<java.lang.Void> |
addWord(AddWordOptions addWordOptions)
Add a custom word.
|
ServiceCall<java.lang.Void> |
addWords(AddWordsOptions addWordsOptions)
Add custom words.
|
ServiceCall<RecognitionJob> |
checkJob(CheckJobOptions checkJobOptions)
Check a job.
|
ServiceCall<RecognitionJobs> |
checkJobs()
Check jobs.
|
ServiceCall<RecognitionJobs> |
checkJobs(CheckJobsOptions checkJobsOptions)
Check jobs.
|
ServiceCall<AcousticModel> |
createAcousticModel(CreateAcousticModelOptions createAcousticModelOptions)
Create a custom acoustic model.
|
ServiceCall<RecognitionJob> |
createJob(CreateJobOptions createJobOptions)
Create a job.
|
ServiceCall<LanguageModel> |
createLanguageModel(CreateLanguageModelOptions createLanguageModelOptions)
Create a custom language model.
|
ServiceCall<java.lang.Void> |
deleteAcousticModel(DeleteAcousticModelOptions deleteAcousticModelOptions)
Delete a custom acoustic model.
|
ServiceCall<java.lang.Void> |
deleteAudio(DeleteAudioOptions deleteAudioOptions)
Delete an audio resource.
|
ServiceCall<java.lang.Void> |
deleteCorpus(DeleteCorpusOptions deleteCorpusOptions)
Delete a corpus.
|
ServiceCall<java.lang.Void> |
deleteJob(DeleteJobOptions deleteJobOptions)
Delete a job.
|
ServiceCall<java.lang.Void> |
deleteLanguageModel(DeleteLanguageModelOptions deleteLanguageModelOptions)
Delete a custom language model.
|
ServiceCall<java.lang.Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
ServiceCall<java.lang.Void> |
deleteWord(DeleteWordOptions deleteWordOptions)
Delete a custom word.
|
ServiceCall<AcousticModel> |
getAcousticModel(GetAcousticModelOptions getAcousticModelOptions)
Get a custom acoustic model.
|
ServiceCall<AudioListing> |
getAudio(GetAudioOptions getAudioOptions)
Get an audio resource.
|
ServiceCall<Corpus> |
getCorpus(GetCorpusOptions getCorpusOptions)
Get a corpus.
|
ServiceCall<LanguageModel> |
getLanguageModel(GetLanguageModelOptions getLanguageModelOptions)
Get a custom language model.
|
ServiceCall<SpeechModel> |
getModel(GetModelOptions getModelOptions)
Get a model.
|
ServiceCall<Word> |
getWord(GetWordOptions getWordOptions)
Get a custom word.
|
ServiceCall<AcousticModels> |
listAcousticModels()
List custom acoustic models.
|
ServiceCall<AcousticModels> |
listAcousticModels(ListAcousticModelsOptions listAcousticModelsOptions)
List custom acoustic models.
|
ServiceCall<AudioResources> |
listAudio(ListAudioOptions listAudioOptions)
List audio resources.
|
ServiceCall<Corpora> |
listCorpora(ListCorporaOptions listCorporaOptions)
List corpora.
|
ServiceCall<LanguageModels> |
listLanguageModels()
List custom language models.
|
ServiceCall<LanguageModels> |
listLanguageModels(ListLanguageModelsOptions listLanguageModelsOptions)
List custom language models.
|
ServiceCall<SpeechModels> |
listModels()
List models.
|
ServiceCall<SpeechModels> |
listModels(ListModelsOptions listModelsOptions)
List models.
|
ServiceCall<Words> |
listWords(ListWordsOptions listWordsOptions)
List custom words.
|
ServiceCall<SpeechRecognitionResults> |
recognize(RecognizeOptions recognizeOptions)
Recognize audio.
|
okhttp3.WebSocket |
recognizeUsingWebSocket(RecognizeOptions recognizeOptions,
RecognizeCallback callback)
Sends audio and returns transcription results for recognition requests over a WebSocket connection.
|
ServiceCall<RegisterStatus> |
registerCallback(RegisterCallbackOptions registerCallbackOptions)
Register a callback.
|
ServiceCall<java.lang.Void> |
resetAcousticModel(ResetAcousticModelOptions resetAcousticModelOptions)
Reset a custom acoustic model.
|
ServiceCall<java.lang.Void> |
resetLanguageModel(ResetLanguageModelOptions resetLanguageModelOptions)
Reset a custom language model.
|
ServiceCall<java.lang.Void> |
trainAcousticModel(TrainAcousticModelOptions trainAcousticModelOptions)
Train a custom acoustic model.
|
ServiceCall<java.lang.Void> |
trainLanguageModel(TrainLanguageModelOptions trainLanguageModelOptions)
Train a custom language model.
|
ServiceCall<java.lang.Void> |
unregisterCallback(UnregisterCallbackOptions unregisterCallbackOptions)
Unregister a callback.
|
ServiceCall<java.lang.Void> |
upgradeAcousticModel(UpgradeAcousticModelOptions upgradeAcousticModelOptions)
Upgrade a custom acoustic model.
|
ServiceCall<java.lang.Void> |
upgradeLanguageModel(UpgradeLanguageModelOptions upgradeLanguageModelOptions)
Upgrade a custom language model.
|
configureClient, configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isJsonMimeType, isJsonPatchMimeType, isTokenManagerSet, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, toString
public SpeechToText()
public SpeechToText(java.lang.String username, java.lang.String password)
username
- the usernamepassword
- the passwordpublic SpeechToText(IamOptions iamOptions)
iamOptions
- the options for authenticating through IAMpublic ServiceCall<SpeechModel> getModel(GetModelOptions getModelOptions)
getModelOptions
- the GetModelOptions
containing the options for the callServiceCall
with a response type of SpeechModel
public ServiceCall<SpeechModels> listModels(ListModelsOptions listModelsOptions)
listModelsOptions
- the ListModelsOptions
containing the options for the callServiceCall
with a response type of SpeechModels
public ServiceCall<SpeechModels> listModels()
ServiceCall
with a response type of SpeechModels
public ServiceCall<SpeechRecognitionResults> recognize(RecognizeOptions recognizeOptions)
recognizeOptions
- the RecognizeOptions
containing the options for the callServiceCall
with a response type of SpeechRecognitionResults
public okhttp3.WebSocket recognizeUsingWebSocket(RecognizeOptions recognizeOptions, RecognizeCallback callback)
recognizeOptions
- the recognize optionscallback
- the RecognizeCallback
instance where results will be sentWebSocket
public ServiceCall<RecognitionJob> checkJob(CheckJobOptions checkJobOptions)
checkJobOptions
- the CheckJobOptions
containing the options for the callServiceCall
with a response type of RecognitionJob
public ServiceCall<RecognitionJobs> checkJobs(CheckJobsOptions checkJobsOptions)
checkJobsOptions
- the CheckJobsOptions
containing the options for the callServiceCall
with a response type of RecognitionJobs
public ServiceCall<RecognitionJobs> checkJobs()
ServiceCall
with a response type of RecognitionJobs
public ServiceCall<RecognitionJob> createJob(CreateJobOptions createJobOptions)
createJobOptions
- the CreateJobOptions
containing the options for the callServiceCall
with a response type of RecognitionJob
public ServiceCall<java.lang.Void> deleteJob(DeleteJobOptions deleteJobOptions)
deleteJobOptions
- the DeleteJobOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<RegisterStatus> registerCallback(RegisterCallbackOptions registerCallbackOptions)
registerCallbackOptions
- the RegisterCallbackOptions
containing the options for the callServiceCall
with a response type of RegisterStatus
public ServiceCall<java.lang.Void> unregisterCallback(UnregisterCallbackOptions unregisterCallbackOptions)
unregisterCallbackOptions
- the UnregisterCallbackOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<LanguageModel> createLanguageModel(CreateLanguageModelOptions createLanguageModelOptions)
createLanguageModelOptions
- the CreateLanguageModelOptions
containing the options for the callServiceCall
with a response type of LanguageModel
public ServiceCall<java.lang.Void> deleteLanguageModel(DeleteLanguageModelOptions deleteLanguageModelOptions)
deleteLanguageModelOptions
- the DeleteLanguageModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<LanguageModel> getLanguageModel(GetLanguageModelOptions getLanguageModelOptions)
getLanguageModelOptions
- the GetLanguageModelOptions
containing the options for the callServiceCall
with a response type of LanguageModel
public ServiceCall<LanguageModels> listLanguageModels(ListLanguageModelsOptions listLanguageModelsOptions)
listLanguageModelsOptions
- the ListLanguageModelsOptions
containing the options for the callServiceCall
with a response type of LanguageModels
public ServiceCall<LanguageModels> listLanguageModels()
ServiceCall
with a response type of LanguageModels
public ServiceCall<java.lang.Void> resetLanguageModel(ResetLanguageModelOptions resetLanguageModelOptions)
resetLanguageModelOptions
- the ResetLanguageModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> trainLanguageModel(TrainLanguageModelOptions trainLanguageModelOptions)
trainLanguageModelOptions
- the TrainLanguageModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> upgradeLanguageModel(UpgradeLanguageModelOptions upgradeLanguageModelOptions)
upgradeLanguageModelOptions
- the UpgradeLanguageModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> addCorpus(AddCorpusOptions addCorpusOptions)
addCorpusOptions
- the AddCorpusOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> deleteCorpus(DeleteCorpusOptions deleteCorpusOptions)
deleteCorpusOptions
- the DeleteCorpusOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<Corpus> getCorpus(GetCorpusOptions getCorpusOptions)
getCorpusOptions
- the GetCorpusOptions
containing the options for the callServiceCall
with a response type of Corpus
public ServiceCall<Corpora> listCorpora(ListCorporaOptions listCorporaOptions)
listCorporaOptions
- the ListCorporaOptions
containing the options for the callServiceCall
with a response type of Corpora
public ServiceCall<java.lang.Void> addWord(AddWordOptions addWordOptions)
addWordOptions
- the AddWordOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> addWords(AddWordsOptions addWordsOptions)
addWordsOptions
- the AddWordsOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> deleteWord(DeleteWordOptions deleteWordOptions)
deleteWordOptions
- the DeleteWordOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<Word> getWord(GetWordOptions getWordOptions)
getWordOptions
- the GetWordOptions
containing the options for the callServiceCall
with a response type of Word
public ServiceCall<Words> listWords(ListWordsOptions listWordsOptions)
listWordsOptions
- the ListWordsOptions
containing the options for the callServiceCall
with a response type of Words
public ServiceCall<AcousticModel> createAcousticModel(CreateAcousticModelOptions createAcousticModelOptions)
createAcousticModelOptions
- the CreateAcousticModelOptions
containing the options for the callServiceCall
with a response type of AcousticModel
public ServiceCall<java.lang.Void> deleteAcousticModel(DeleteAcousticModelOptions deleteAcousticModelOptions)
deleteAcousticModelOptions
- the DeleteAcousticModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<AcousticModel> getAcousticModel(GetAcousticModelOptions getAcousticModelOptions)
getAcousticModelOptions
- the GetAcousticModelOptions
containing the options for the callServiceCall
with a response type of AcousticModel
public ServiceCall<AcousticModels> listAcousticModels(ListAcousticModelsOptions listAcousticModelsOptions)
listAcousticModelsOptions
- the ListAcousticModelsOptions
containing the options for the callServiceCall
with a response type of AcousticModels
public ServiceCall<AcousticModels> listAcousticModels()
ServiceCall
with a response type of AcousticModels
public ServiceCall<java.lang.Void> resetAcousticModel(ResetAcousticModelOptions resetAcousticModelOptions)
resetAcousticModelOptions
- the ResetAcousticModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> trainAcousticModel(TrainAcousticModelOptions trainAcousticModelOptions)
trainAcousticModelOptions
- the TrainAcousticModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> upgradeAcousticModel(UpgradeAcousticModelOptions upgradeAcousticModelOptions)
upgradeAcousticModelOptions
- the UpgradeAcousticModelOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> addAudio(AddAudioOptions addAudioOptions)
addAudioOptions
- the AddAudioOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<java.lang.Void> deleteAudio(DeleteAudioOptions deleteAudioOptions)
deleteAudioOptions
- the DeleteAudioOptions
containing the options for the callServiceCall
with a response type of Voidpublic ServiceCall<AudioListing> getAudio(GetAudioOptions getAudioOptions)
getAudioOptions
- the GetAudioOptions
containing the options for the callServiceCall
with a response type of AudioListing
public ServiceCall<AudioResources> listAudio(ListAudioOptions listAudioOptions)
listAudioOptions
- the ListAudioOptions
containing the options for the callServiceCall
with a response type of AudioResources
public ServiceCall<java.lang.Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
deleteUserDataOptions
- the DeleteUserDataOptions
containing the options for the callServiceCall
with a response type of Void