View Source ExAzureSpeech.Common.Messages.AudioMessage (ex_azure_speech v0.2.2)
Represents an audio message to be sent over a socket. The audio itself can be streammed in chunks.
Path: audio
Content-Type: audio/x-wav or audio/ogg
MessageType: binary
Supported formats:
- WAV (with PCM 16-bit samples, 16 kHz sample rate, and a single channel).
- OGG (with Opus codec, 16 kHz sample rate, and a single channel).
Summary
Types
content: The audio content chunk in a byte array format. size: The size of the audio content in bytes.
Functions
Creates an audio message with no body, this is used to signal the end of the audio stream.
Creates a new audio message.
Types
@type t() :: %ExAzureSpeech.Common.Messages.AudioMessage{ content: iodata(), size: non_neg_integer() }
content: The audio content chunk in a byte array format. size: The size of the audio content in bytes.
Functions
@spec end_of_stream() :: t()
Creates an audio message with no body, this is used to signal the end of the audio stream.
Creates a new audio message.