Contents

setModules(_:)

Adds or removes modules.

Declaration

final func setModules(_ newModules: [any SpeechModule]) async throws

Parameters

  • newModules:

    A list of modules to include in the analyzer. These modules replace the previous modules, but you may preserve previous modules by including them in the list.

Discussion

Modules can be added or removed to the analyzer mid-stream. A newly-added module will immediately begin analysis on new audio input, but it will not have access to already-analyzed audio. However, you may keep a copy of previously-analyzed audio and provide it to a separate analyzer.

Modules cannot be reused from a different analyzer.

See Also

Managing modules