SpeechTilesAndamento Docs
Get started
SDK Reference · Method

loadAudioPromptModules (URL)

Loads Prompt Modules from a Conversation resource.

Declaration

public func loadAudioPromptModules(from resource: String) -> STResult

Overview

Requires an initialized, idle runner. The resource is resolved through the Conversation file-location resolver. An unresolved resource returns .fileNotFound.

Loading and prerequisites

Load the Prompt Module definitions from a resource resolvable through the configured local resource location. Initialize the runner and ensure the Conversation is idle before loading.

Parameters

  • resource — String Refer to the method-specific behavior and usage example for how this parameter is used.

Usage example

_ = conversation.loadAudioPromptModules(from: "APM_Main.json")

Result handling

This loading method executes synchronously. .success indicates that the requested resource data was loaded successfully. Handle other STResult values as loading failures.

Resource location

Before loading a resource file, you may configure the default local directory with STConversationRunner.setResourceLocation using .conversation from STResourceCategory.

By default, the language-specific directory is en-US. The loader first searches that language-specific directory under the configured resource location. If the resource is not found there, it searches the parent resource directory as a fallback. You can select another language-specific directory using STConversationRunner.setLanguageFolder.

See Also