Geminix.V1beta.SpeechConfig (geminix v0.2.0)

The speech generation config.

Fields:

  • :language_code (binary/0) - Optional. Language code (in BCP 47 format, e.g. "en-US") for speech synthesis. Valid values are: de-DE, en-AU, en-GB, en-IN, en-US, es-US, fr-FR, hi-IN, pt-BR, ar-XA, es-ES, fr-CA, id-ID, it-IT, ja-JP, tr-TR, vi-VN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, ta-IN, te-IN, nl-NL, ko-KR, cmn-CN, pl-PL, ru-RU, and th-TH.
  • :multi_speaker_voice_config (Geminix.V1beta.MultiSpeakerVoiceConfig.t/0) - Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field.
  • :voice_config (Geminix.V1beta.VoiceConfig.t/0) - The configuration in case of single-voice output.

Summary

Functions

Create a Geminix.V1beta.SpeechConfig.t/0 from a map returned by the Gemini API.

Types

t()

@type t() :: %Geminix.V1beta.SpeechConfig{
  __meta__: term(),
  language_code: binary(),
  multi_speaker_voice_config: Geminix.V1beta.MultiSpeakerVoiceConfig.t(),
  voice_config: Geminix.V1beta.VoiceConfig.t()
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.SpeechConfig.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.