Class AudioResource

All Implemented Interfaces:

public class AudioResource
Information about an audio resource from a custom acoustic model.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  AudioResource.Status
    The status of the audio resource: * `ok`: The service successfully analyzed the audio data.
  • Constructor Summary

    Constructor Description
  • Method Summary

    Modifier and Type Method Description
    AudioDetails getDetails()
    Gets the details.
    Long getDuration()
    Gets the duration.
    String getName()
    Gets the name.
    String getStatus()
    Gets the status.

    Methods inherited from class

    equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AudioResource

      public AudioResource()
  • Method Details

    • getDuration

      public Long getDuration()
      Gets the duration.

      The total seconds of audio in the audio resource.

      the duration
    • getName

      public String getName()
      Gets the name.

      **For an archive-type resource,** the user-specified name of the resource.

      **For an audio-type resource,** the user-specified name of the resource or the name of the audio file that the user added for the resource. The value depends on the method that is called.

      the name
    • getDetails

      public AudioDetails getDetails()
      Gets the details.

      An `AudioDetails` object that provides detailed information about the audio resource. The object is empty until the service finishes processing the audio.

      the details
    • getStatus

      public String getStatus()
      Gets the status.

      The status of the audio resource: * `ok`: The service successfully analyzed the audio data. The data can be used to train the custom model. * `being_processed`: The service is still analyzing the audio data. The service cannot accept requests to add new audio resources or to train the custom model until its analysis is complete. * `invalid`: The audio data is not valid for training the custom model (possibly because it has the wrong format or sampling rate, or because it is corrupted). For an archive file, the entire archive is invalid if any of its audio files are invalid.

      the status