SpeechTilesAndamento Docs
Get started
SDK Reference · Method

initialize

Initializes the conversation runtime and its required media infrastructure.

Declaration

public func initialize() -> STResult

Overview

Initialization is idempotent; an already initialized runner returns .success.

The current implementation authenticates/associates the conversation layer with STMediaRunner, initializes the shared media runner, wires the conversation managers, initializes the required playback, synthesis, recording, and recognition components, installs media-event observation, and establishes background-audio capability.

The method returns the first non-success result encountered during initialization.

Initialization and failure handling

Initialize once before configuring and running a conversation. The method returns the first initialization failure; do not proceed to resource loading if it fails. Calling it again on an initialized runner succeeds.

Usage example

let conversation = STConversationRunner()
guard conversation.initialize() == .success else { return }

Result handling

This method returns an STResult. Check the returned value for success or failure.

See Also