Class CommonAudioFormat


  • public final class CommonAudioFormat
    extends Object
    Enumeration for common types of audio formats. Certain task types such as speech synthesis produce audio files. Some prompt services allow the user to select the format of that audio file. Implementations are encouraged to use these constants to increase interoperability between different prompt service implementations, but are not required to do so.
    Since:
    8.5.0
    See Also:
    IPromptQueryConfig_AudioFormat
    • Field Detail

      • ADVANCED_AUDIO_CODEC

        public static final String ADVANCED_AUDIO_CODEC
        The Advanced Audio Codec format, commonly known as "aac".
        See Also:
        Constant Field Values
      • FREE_LOSSLESS_AUDIO_CODEC

        public static final String FREE_LOSSLESS_AUDIO_CODEC
        The Free Lossless Audio Codec format, commonly known as "flac".
        See Also:
        Constant Field Values
      • MPEG_AUDIO_LAYER_3

        public static final String MPEG_AUDIO_LAYER_3
        The MPEG Audio Layer 3 format, commonly known as "mp3".
        See Also:
        Constant Field Values
      • PULSE_CODE_MODULATION

        public static final String PULSE_CODE_MODULATION
        The Pulse-Code Modulation format, commonly known as "pcm".
        See Also:
        Constant Field Values
      • WAVEFORM

        public static final String WAVEFORM
        The Waveform Audio File Format, commonly known as "wav" or "wave".
        See Also:
        Constant Field Values
    • Method Detail

      • localizedDescription

        public static String localizedDescription​(Locale locale,
                                                  String commonAudioFormat)
        Gets the localized description for the given common audio format. The value should be one of the constants defined in this class. When an unknown value is given, returns an implementation-defined default description.
        Parameters:
        locale - The locale for which to localize the description.
        commonAudioFormat - The common audio format constant, must be one of the constants defined in this class.
        Returns:
        The localized description for the given common audio format.
      • localizedLabel

        public static String localizedLabel​(Locale locale,
                                            String commonAudioFormat)
        Gets the localized label for the given common audio format. The value should be one of the constants defined in this class. When an unknown value is given, returns an implementation-defined default label.
        Parameters:
        locale - The locale for which to localize the label.
        commonAudioFormat - The common audio format constant, must be one of the constants defined in this class.
        Returns:
        The localized label for the given common audio format.