Class SpeechToTextServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.speechtotext.remote.SpeechToTextServiceRemoteImpl
- All Implemented Interfaces:
SpeechToTextService
Generates subtitles files from video or audio sources.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.serviceregistry.api.RemoteBase
RemoteBase.HttpClientClosingInputStream -
Field Summary
Fields inherited from class org.opencastproject.serviceregistry.api.RemoteBase
client, remoteServiceManager, serviceTypeFields inherited from interface org.opencastproject.speechtotext.api.SpeechToTextService
JOB_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new speech-to-text service instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetRemoteServiceManager(ServiceRegistry remoteServiceManager) Sets the remote service manager.voidSets the trusted http clienttranscribe(URI mediaFile, String language, Boolean translate) Generates a subtitles file for a media package with an audio track.Methods inherited from class org.opencastproject.serviceregistry.api.RemoteBase
closeConnection, elementsFromHttpResponse, getResponse, getResponse, runRequest
-
Constructor Details
-
SpeechToTextServiceRemoteImpl
public SpeechToTextServiceRemoteImpl()Creates a new speech-to-text service instance.
-
-
Method Details
-
transcribe
public Job transcribe(URI mediaFile, String language, Boolean translate) throws SpeechToTextServiceException Generates a subtitles file for a media package with an audio track.- Specified by:
transcribein interfaceSpeechToTextService- Parameters:
mediaFile- Location of the media file to generate subtitles for.language- The language of the audio.- Returns:
- SpeechToText service job.
- Throws:
SpeechToTextServiceException- If something went wrong during the subtitle's generation.- See Also:
-
setTrustedHttpClient
Description copied from class:RemoteBaseSets the trusted http client- Overrides:
setTrustedHttpClientin classRemoteBase- Parameters:
client-
-
setRemoteServiceManager
Description copied from class:RemoteBaseSets the remote service manager.- Overrides:
setRemoteServiceManagerin classRemoteBase- Parameters:
remoteServiceManager-
-