SpeechTilesAndamento Docs
Get started
SDK Reference · Method

initialize

Initializes the STMediaRunner framework layer.

Declaration

public func initialize() -> STResult

Overview

Call initialize() before initializing or using the media components managed by STMediaRunner.

If STMediaRunner is already initialized, the method returns .success.

This method establishes the framework-level event, audio-environment, and permission infrastructure. Components that perform playback, recording, or recognition still use their own initialization methods.

Typical sequence

let mediaRunner = STMediaRunner.shared

guard mediaRunner.initialize() == .success else {
    return
}

_ = mediaRunner.initializeAudioPlayer()
_ = mediaRunner.initializeAudioRecorder()

Initialize only the components required by the application.

See Also