def __init__( self, *, spe...
# ask-ai
h
def __init__( self, *, speech_key: NotGivenOr[str] = NOT_GIVEN, speech_region: NotGivenOr[str] = NOT_GIVEN, speech_host: NotGivenOr[str] = NOT_GIVEN, speech_auth_token: NotGivenOr[str] = NOT_GIVEN, sample_rate: int = 16000, num_channels: int = 1, segmentation_silence_timeout_ms: NotGivenOr[int] = NOT_GIVEN, segmentation_max_time_ms: NotGivenOr[int] = NOT_GIVEN, segmentation_strategy: NotGivenOr[str] = NOT_GIVEN, # Azure handles multiple languages and can auto-detect the language used. It requires the candidate set to be set. # noqa: E501 language: NotGivenOr[str | list[str] | None] = NOT_GIVEN, profanity: NotGivenOr[speechsdk.enums.ProfanityOption] = NOT_GIVEN, speech_endpoint: NotGivenOr[str] = NOT_GIVEN, phrase_list: NotGivenOr[list[str] | None] = NOT_GIVEN, explicit_punctuation: bool = False, 😞 what is the diffference between speech host and speech endpoint ? what should i use
t
Thanks for reaching out, Sahil. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I’m glad you asked about the
speech_host
and
speech_endpoint
parameters! They’re both important for setting up Azure Speech services, but they do have different roles: • speech_host: This is your go-to for the custom endpoint of an Azure Speech service, especially if you’re working with private or containerized instances. It’s perfect when you’re deploying on-premises or when you want more direct control over the service endpoint—maybe for compliance or to reduce latency. • speech_endpoint: This lets you specify a custom Azure endpoint URL for Speech services, so you can send requests to a particular regional or custom Azure Speech deployment. It’s really handy if you’re managing multi-region setups or special Azure environments. Just a heads-up: these options don’t work together with
speech_region
. If you set both
speech_region
and
speech_endpoint
, the
speech_endpoint
will take precedence, and you’ll see a warning about this. So, if you’re using containerized or private Azure Speech instances, lean on
speech_host
. For targeting specific Azure deployment URLs,
speech_endpoint
is the way to go. If anything’s still unclear or you want to dive deeper, I’m here to help! Sources: Azure Speech STT plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.py | Azure Speech TTS plugin guide | LiveKit Docs
h
ok but in azure tts i dont see speech host as the parameter class TTS(tts.TTS): def __init__( self, *, voice: str = "en-US-JennyNeural", language: str | None = None, sample_rate: int = 24000, prosody: NotGivenOr[ProsodyConfig] = NOT_GIVEN, style: NotGivenOr[StyleConfig] = NOT_GIVEN, speech_key: str | None = None, speech_region: str | None = None, speech_endpoint: str | None = None, deployment_id: str | None = None, speech_auth_token: str | None = None, http_session: aiohttp.ClientSession | None = None, )
t
In Azure TTS, the
speech_host
parameter is supported and serves as a helpful alternative to
speech_endpoint
or
speech_region
. It matches the
AZURE_SPEECH_HOST
environment variable and is especially useful for specifying the Azure Speech endpoint in custom or private deployments. When you're setting up the Azure TTS plugin, you can comfortably use
speech_host
as one of the valid options. For instance, you might choose to set either: •
speech_host
, or •
speech_key
and
speech_region
, or •
speech_auth_token
and
speech_region
. If you don’t see
speech_host
in your setup, it could be due to variations in the library or version you’re working with. Please feel free to reach out if you’d like me to help you dig deeper or clarify anything else! Sources: Azure Speech TTS plugin guide | LiveKit Docs