Interface AIServiceSpeechAsync

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    AIServiceSpeechAsyncClient

    @Generated(value="OracleSDKGenerator",
               comments="API Version: 20220101")
    public interface AIServiceSpeechAsync
    extends AutoCloseable
    The OCI Speech Service harnesses the power of spoken language by allowing developers to easily convert file-based data containing human speech into highly accurate text transcriptions.
    • Method Detail

      • refreshClient

        void refreshClient()
        Rebuilds the client from scratch.

        Useful to refresh certificates.

      • setEndpoint

        void setEndpoint​(String endpoint)
        Sets the endpoint to call (ex, https://www.example.com).
        Parameters:
        endpoint - The endpoint of the serice.
      • getEndpoint

        String getEndpoint()
        Gets the set endpoint for REST call (ex, https://www.example.com)
      • setRegion

        void setRegion​(Region region)
        Sets the region to call (ex, Region.US_PHOENIX_1).

        Note, this will call setEndpoint after resolving the endpoint. If the service is not available in this region, however, an IllegalArgumentException will be raised.

        Parameters:
        region - The region of the service.
      • setRegion

        void setRegion​(String regionId)
        Sets the region to call (ex, ‘us-phoenix-1’).

        Note, this will first try to map the region ID to a known Region and call setRegion.

        If no known Region could be determined, it will create an endpoint based on the default endpoint format (Region.formatDefaultRegionEndpoint(Service, String) and then call setEndpoint.

        Parameters:
        regionId - The public region ID.
      • useRealmSpecificEndpointTemplate

        void useRealmSpecificEndpointTemplate​(boolean realmSpecificEndpointTemplateEnabled)
        Determines whether realm specific endpoint should be used or not.

        Set realmSpecificEndpointTemplateEnabled to “true” if the user wants to enable use of realm specific endpoint template, otherwise set it to “false”

        Parameters:
        realmSpecificEndpointTemplateEnabled - flag to enable the use of realm specific endpoint template
      • cancelTranscriptionJob

        Future<CancelTranscriptionJobResponse> cancelTranscriptionJob​(CancelTranscriptionJobRequest request,
                                                                      AsyncHandler<CancelTranscriptionJobRequest,​CancelTranscriptionJobResponse> handler)
        Canceling the job cancels all the tasks under it.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createCustomization

        Future<CreateCustomizationResponse> createCustomization​(CreateCustomizationRequest request,
                                                                AsyncHandler<CreateCustomizationRequest,​CreateCustomizationResponse> handler)
        Creates a new Customization.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • createTranscriptionJob

        Future<CreateTranscriptionJobResponse> createTranscriptionJob​(CreateTranscriptionJobRequest request,
                                                                      AsyncHandler<CreateTranscriptionJobRequest,​CreateTranscriptionJobResponse> handler)
        Creates a new Transcription Job.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteCustomization

        Future<DeleteCustomizationResponse> deleteCustomization​(DeleteCustomizationRequest request,
                                                                AsyncHandler<DeleteCustomizationRequest,​DeleteCustomizationResponse> handler)
        Delete Customization and its metadata from tenancy.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • deleteTranscriptionJob

        Future<DeleteTranscriptionJobResponse> deleteTranscriptionJob​(DeleteTranscriptionJobRequest request,
                                                                      AsyncHandler<DeleteTranscriptionJobRequest,​DeleteTranscriptionJobResponse> handler)
        Delete API cleans job, tasks and the related metadata.

        However the generated transcriptions in customer tenancy will not be deleted.

        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getCustomization

        Future<GetCustomizationResponse> getCustomization​(GetCustomizationRequest request,
                                                          AsyncHandler<GetCustomizationRequest,​GetCustomizationResponse> handler)
        Gets a Customization by identifier
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getTranscriptionJob

        Future<GetTranscriptionJobResponse> getTranscriptionJob​(GetTranscriptionJobRequest request,
                                                                AsyncHandler<GetTranscriptionJobRequest,​GetTranscriptionJobResponse> handler)
        Gets a Transcription Job by identifier
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • getTranscriptionTask

        Future<GetTranscriptionTaskResponse> getTranscriptionTask​(GetTranscriptionTaskRequest request,
                                                                  AsyncHandler<GetTranscriptionTaskRequest,​GetTranscriptionTaskResponse> handler)
        Gets a Transcription Task by identifier
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listCustomizations

        Future<ListCustomizationsResponse> listCustomizations​(ListCustomizationsRequest request,
                                                              AsyncHandler<ListCustomizationsRequest,​ListCustomizationsResponse> handler)
        Returns a list of Customizations.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listTranscriptionJobs

        Future<ListTranscriptionJobsResponse> listTranscriptionJobs​(ListTranscriptionJobsRequest request,
                                                                    AsyncHandler<ListTranscriptionJobsRequest,​ListTranscriptionJobsResponse> handler)
        Returns a list of Transcription Jobs.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listTranscriptionTasks

        Future<ListTranscriptionTasksResponse> listTranscriptionTasks​(ListTranscriptionTasksRequest request,
                                                                      AsyncHandler<ListTranscriptionTasksRequest,​ListTranscriptionTasksResponse> handler)
        Returns a list of Transcription Tasks.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • listVoices

        Future<ListVoicesResponse> listVoices​(ListVoicesRequest request,
                                              AsyncHandler<ListVoicesRequest,​ListVoicesResponse> handler)
        Returns a list of speakers available to the user to choose from based on language code and voice type provided.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • synthesizeSpeech

        Future<SynthesizeSpeechResponse> synthesizeSpeech​(SynthesizeSpeechRequest request,
                                                          AsyncHandler<SynthesizeSpeechRequest,​SynthesizeSpeechResponse> handler)
        Creates an audio for the given input text based on other input parameters like language, voice type, etc.
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updateCustomization

        Future<UpdateCustomizationResponse> updateCustomization​(UpdateCustomizationRequest request,
                                                                AsyncHandler<UpdateCustomizationRequest,​UpdateCustomizationResponse> handler)
        Updates a Customization by identifier
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.
      • updateTranscriptionJob

        Future<UpdateTranscriptionJobResponse> updateTranscriptionJob​(UpdateTranscriptionJobRequest request,
                                                                      AsyncHandler<UpdateTranscriptionJobRequest,​UpdateTranscriptionJobResponse> handler)
        Updates the Transcription Job
        Parameters:
        request - The request object containing the details to send
        handler - The request handler to invoke upon completion, may be null.
        Returns:
        A Future that can be used to get the response if no AsyncHandler was provided. Note, if you provide an AsyncHandler and use the Future, some types of responses (like java.io.InputStream) may not be able to be read in both places as the underlying stream may only be consumed once.