Deepgram.Types.Speak (Deepgram v0.1.0)

View Source

Types for the Speak (Text-to-Speech) service.

Summary

Types

audio_data()

@type audio_data() :: %{type: String.t(), data: binary()}

cleared_response()

@type cleared_response() :: %{type: String.t()}

close_response()

@type close_response() :: %{type: String.t()}

error_response()

@type error_response() :: %{
  type: String.t(),
  error_code: String.t(),
  error_msg: String.t()
}

flushed_response()

@type flushed_response() :: %{type: String.t()}

open_response()

@type open_response() :: %{type: String.t()}

speak_options()

@type speak_options() :: %{
  optional(:model) => String.t(),
  optional(:encoding) => String.t(),
  optional(:container) => String.t(),
  optional(:sample_rate) => integer(),
  optional(:bit_rate) => integer(),
  optional(:callback) => String.t(),
  optional(:callback_method) => String.t()
}

speak_response()

@type speak_response() :: %{
  content_type: String.t(),
  request_id: String.t(),
  model_uuid: String.t(),
  model_name: String.t(),
  characters: integer(),
  transfer_encoding: String.t(),
  date: String.t()
}

speak_ws_metadata()

@type speak_ws_metadata() :: %{
  type: String.t(),
  request_id: String.t(),
  model_uuid: String.t(),
  model_name: String.t(),
  characters: integer(),
  transfer_encoding: String.t(),
  date: String.t()
}

speak_ws_options()

@type speak_ws_options() :: %{
  optional(:model) => String.t(),
  optional(:encoding) => String.t(),
  optional(:container) => String.t(),
  optional(:sample_rate) => integer(),
  optional(:bit_rate) => integer()
}

text_source()

@type text_source() :: %{text: String.t()}

unhandled_response()

@type unhandled_response() :: %{type: String.t(), raw: String.t()}

warning_response()

@type warning_response() :: %{
  type: String.t(),
  warn_code: String.t(),
  warn_msg: String.t()
}