View Source ExAzureSpeech.TextToSpeech.SocketConfig (ex_azure_speech v0.2.2)

Module for defining the configuration for the Text-to-Speech WebSocket connection.

Summary

Types

t()
  • :connection_id (String.t/0) - Required. A unique identifier for the connection. This is used to correlate the recognition results with the requests.

Functions

Returns the URI for the Text-to-Speech WebSocket connection.

Returns a validated configuration for the Text-to-Speech WebSocket connection.

Types

@type t() :: [
  connection_id: binary(),
  auth_key: binary(),
  region: binary(),
  endpoint_id: binary()
]
  • :connection_id (String.t/0) - Required. A unique identifier for the connection. This is used to correlate the recognition results with the requests.

  • :auth_key (String.t/0) - Required. The subscription key for the Azure Cognitive Services Speech Service.

  • :region (String.t/0) - Required. The region where the Azure Cognitive Services Speech Service is hosted. This is used to determine the base URL for the WebSocket connection.

  • :endpoint_id (String.t/0) - Endpoint ID for the custom voice. This is required when using a custom voice model.

Example Configuration

[

connection_id: "my-connection-id",
region: "eastus",
auth_key: "my-auth-key",
endpoint_id: "my-endpoint-id"

]

Functions

@spec get_uri(t()) :: String.t()

Returns the URI for the Text-to-Speech WebSocket connection.

@spec new(Keyword.t()) :: {:ok, t()} | {:error, NimbleOptions.ValidationError.t()}

Returns a validated configuration for the Text-to-Speech WebSocket connection.