Class GoogleSpeechTranscriptionRestService
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.transcription.googlespeech.endpoint.GoogleSpeechTranscriptionRestService
@Path("/transcripts/googlespeech")
public class GoogleSpeechTranscriptionRestService
extends AbstractJobProducerEndpoint
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GoogleSpeechTranscriptionServiceThe transcription serviceprotected ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Returns the job producer that is backing this REST endpoint.Return the service registry.javax.ws.rs.core.ResponsegetTranscriptionResult(String jobId, javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponsegetTranscriptionStatus(String mpId, javax.servlet.http.HttpServletRequest request) voidsetServiceRegistry(ServiceRegistry service) voidMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The transcription service -
serviceRegistry
The service registry
-
-
Constructor Details
-
GoogleSpeechTranscriptionRestService
public GoogleSpeechTranscriptionRestService()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) -
setTranscriptionService
-
setServiceRegistry
-
getService
Description copied from class:AbstractJobProducerEndpointReturns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
-
getServiceRegistry
Description copied from class:AbstractJobProducerEndpointReturn the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint
-
getTranscriptionResult
@GET @Path("results") @Produces("application/json") public javax.ws.rs.core.Response getTranscriptionResult(@QueryParam("jobId") String jobId, @Context javax.servlet.http.HttpServletRequest request) throws TranscriptionServiceException, IOException -
getTranscriptionStatus
@GET @Path("status") @Produces("text/plain") public javax.ws.rs.core.Response getTranscriptionStatus(@QueryParam("mediaPackageID") String mpId, @Context javax.servlet.http.HttpServletRequest request) throws TranscriptionServiceException - Throws:
TranscriptionServiceException
-