Package struct

Class AudioData

java.lang.Object
struct.AudioData

public class AudioData extends Object
The class dealing with the audio information in game such as raw audio data, FFT and Mel-Spectrogram transformation.
For more details on the data structure, please see https://tinyurl.com/DareFightingICE/AI.
  • Field Details

    • rawData

      private float[][] rawData
      Raw audio data.
    • rawDataAsBytes

      private byte[] rawDataAsBytes
      Raw audio data as byte sequence.
    • fftData

      private FFTData[] fftData
      Fourier-transformed audio data.
    • spectrogramData

      private float[][][] spectrogramData
      Mel-Spectrogram audio data.
    • spectrogramDataAsBytes

      private byte[] spectrogramDataAsBytes
      Mel-Spectrogram audio data as byte sequence.
  • Method Details

    • getRawData

      public float[][] getRawData()
      Gets raw audio data.
      Returns:
      raw audio data.
    • getRawDataAsBytes

      public byte[] getRawDataAsBytes()
      Byte sequence version of getRawData().
      This method is recommended for Python-based AI
      Returns:
      raw audio data as byte sequence.
    • getFftData

      public FFTData[] getFftData()
      Gets Fast Fourier Transform data.
      Returns:
      Fast Fourier Transform data.
    • getSpectrogramData

      public float[][][] getSpectrogramData()
      Gets Mel-Spectrogram data.
      Returns:
      Mel-Spectrogram data.
    • getSpectrogramDataAsBytes

      public byte[] getSpectrogramDataAsBytes()
      Byte sequence version of getSpectrogramData().
      This method is recommended for Python-based AI
      Returns:
      Mel-Spectrogram data as byte sequence.