Class AudioRecordEvent.Builder

Enclosing class:
AudioRecordEvent

Builder for setting the Audio Record event parameters.
  • Method Details

    • format

      File format for the recording.
      Parameters:
      format - The format as a string.
      Returns:
      This builder.
    • validity

      public AudioRecordEvent.Builder validity(int validity)
      Audio recording validity parameter.
      Parameters:
      validity - The validity as an int.
      Returns:
      This builder.
    • channels

      public AudioRecordEvent.Builder channels(int channels)
      Number of channels for the recording.
      Parameters:
      channels - The number of channels as an int.
      Returns:
      This builder.
    • streamed

      public AudioRecordEvent.Builder streamed(boolean streamed)
      Whether the audio recording is streamed.
      Parameters:
      streamed - true if the recording should be streamed.
      Returns:
      This builder.
    • split

      public AudioRecordEvent.Builder split(boolean split)
      Whether the recording should be split.
      Parameters:
      split - true if the audio should be split.
      Returns:
      This builder.
    • multitrack

      public AudioRecordEvent.Builder multitrack(boolean multitrack)
      Whether the audio should have multiple tracks.
      Parameters:
      multitrack - true if the recording should be multi-track.
      Returns:
      This builder.
    • detectSpeech

      public AudioRecordEvent.Builder detectSpeech(boolean detectSpeech)
      Whether speech detection is enabled.
      Parameters:
      detectSpeech - true to enable speech detection.
      Returns:
      This builder.
    • beepStart

      public AudioRecordEvent.Builder beepStart(boolean beepStart)
      Whether to set the beep_start flag.
      Parameters:
      beepStart - true to enable beep start.
      Returns:
      This builder.
    • beepStop

      public AudioRecordEvent.Builder beepStop(boolean beepStop)
      Whether to set the beep_stop flag.
      Parameters:
      beepStop - true to enable beep stop.
      Returns:
      This builder.
    • sentimentAnalysis

      public AudioRecordEvent.Builder sentimentAnalysis(boolean sentimentAnalysis)
      Whether to enable sentiment analysis in the recording transcription.
      Parameters:
      sentimentAnalysis - true to enable transcription sentiment analysis.
      Returns:
      This builder.
    • language

      Text-to-speech transcription language. Setting this will enable recording transcription.
      Parameters:
      language - The transcription language as an enum.
      Returns:
      This builder.
    • build

      Description copied from class: Event.Builder
      Builds the EventWithBody.
      Specified by:
      build in class Event.Builder<AudioRecordEvent,AudioRecordEvent.Builder>
      Returns:
      An instance of Event, populated with all fields from this builder.