Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

AzureVoiceLive

Realtime speech-to-speech integration for Azure Voice Live. Wraps the Azure Voice Live realtime model so it can be used as a full speech-to-speech provider within the runtime. Configuration is supplied through an AzureVoiceLiveConfig instance and resolved into a flat parameter map for the runtime.

Constructor

api_key
str | None
Azure Voice Live API key. When omitted, the value of the AZURE_VOICE_LIVE_API_KEY environment variable is used.
config
AzureVoiceLiveConfig | None
Provider configuration. When omitted, a default AzureVoiceLiveConfig is used.
endpoint
str | None
Service endpoint URL. When omitted, the endpoint from config is used, falling back to the AZURE_VOICE_LIVE_ENDPOINT environment variable, then an empty string.

aclose

Release any resources held by the integration. This implementation performs no work and exists so the integration can be used interchangeably with providers that require teardown.

cleanup

Clean up the integration by delegating to aclose.

AzureVoiceLiveConfig

Fields

model
str
default:"gpt-4o-realtime-preview"
voice
str
default:"en-US-AvaNeural"
endpoint
Optional[str]
modalities
List[str]
default:"…"
temperature
Optional[float]
max_response_output_tokens
Union[int, str, None]
turn_detection
Optional[TurnDetectionConfig]
default:"…"
input_audio_transcription
Optional[InputAudioTranscriptionConfig]
default:"…"
tool_choice
str
default:"auto"

TurnDetectionConfig

Fields

type
str
default:"server_vad"
threshold
float
default:"0.5"
prefix_padding_ms
int
default:"300"
silence_duration_ms
int
default:"500"
create_response
bool
default:"True"
interrupt_response
bool
default:"True"

InputAudioTranscriptionConfig

Fields

model
str
default:"gpt-4o-mini-transcribe"