View Source ExAzureSpeech.TextToSpeech behaviour (ex_azure_speech v0.2.1)

Azure Text-to-Speech module, which provides the functionality to synthesize text into speech.

Summary

Types

The options for the Text-to-Speech Synthesizer module.

Callbacks

Synthesizes the given SSML into speech.

Synthesizes the given text into speech.

Types

@type opts() :: [
  socket_opts: ExAzureSpeech.TextToSpeech.SocketConfig.t() | nil,
  speech_synthesis_opts:
    ExAzureSpeech.TextToSpeech.SpeechSynthesisConfig.t() | nil,
  timeout: integer() | nil
]

The options for the Text-to-Speech Synthesizer module.

Callbacks

Link to this callback

speak_ssml(ssml, opts, callbacks)

View Source

Synthesizes the given SSML into speech.

Parameters:

  • ssml: The SSML to synthesize.
  • opts: The options for the synthesis.
  • callbacks: The callbacks for the synthesis. See ExAzureSpeech.TextToSpeech.Websocket.callbacks().
Link to this callback

speak_text(text, voice, language, opts, callbacks)

View Source

Synthesizes the given text into speech.

Parameters:

  • text: The text to synthesize.
  • voice: The voice to use for the synthesis. E.g: en-US-AriaNeural
  • language: The language code for the synthesis. E.g: en-US
  • opts: The options for the synthesis.
  • callbacks: The callbacks for the synthesis. See ExAzureSpeech.TextToSpeech.Websocket.callbacks()