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
@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
@callback speak_ssml( ssml :: String.t(), opts :: opts(), callbacks :: ExAzureSpeech.TextToSpeech.Websocket.callbacks() ) :: {:ok, [binary() | ExAzureSpeech.Common.Errors.Internal.t()]} | {:error, ExAzureSpeech.Common.Errors.Internal.t() | ExAzureSpeech.Common.Errors.InvalidResponse.t() | ExAzureSpeech.Common.Errors.Forbidden.t() | NimbleOptions.ValidationError.t()}
Synthesizes the given SSML into speech.
Parameters:
ssml
: The SSML to synthesize.opts
: The options for the synthesis.callbacks
: The callbacks for the synthesis. SeeExAzureSpeech.TextToSpeech.Websocket.callbacks()
.
@callback speak_text( text :: String.t(), voice :: String.t(), language :: String.t(), opts :: opts(), callbacks :: ExAzureSpeech.TextToSpeech.Websocket.callbacks() ) :: {:ok, [binary() | ExAzureSpeech.Common.Errors.Internal.t()]} | {:error, ExAzureSpeech.Common.Errors.Internal.t() | ExAzureSpeech.Common.Errors.InvalidResponse.t() | ExAzureSpeech.Common.Errors.Forbidden.t() | NimbleOptions.ValidationError.t()}
Synthesizes the given text into speech.
Parameters:
text
: The text to synthesize.voice
: The voice to use for the synthesis. E.g: en-US-AriaNeurallanguage
: The language code for the synthesis. E.g: en-USopts
: The options for the synthesis.callbacks
: The callbacks for the synthesis. SeeExAzureSpeech.TextToSpeech.Websocket.callbacks()