Classes

The following classes are available globally.

  • Speech is the primary interface. To use, set the voice and then call .speak(string: "your string")

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Use the instance-based OSSSpeechEngine async API.")
    public class OSSSpeech : NSObject, @unchecked Sendable
    extension OSSSpeech: SFSpeechRecognitionTaskDelegate, SFSpeechRecognizerDelegate
  • Instance-based, main-actor-isolated speech synthesis and recognition engine.

    See more

    Declaration

    Swift

    @MainActor
    public final class OSSSpeechEngine : NSObject
    extension OSSSpeechEngine: AVSpeechSynthesizerDelegate, SFSpeechRecognizerDelegate
  • Utility methods for localized strings and diagnostics used by OSSSpeechKit.

    See more

    Declaration

    Swift

    public class OSSSpeechUtility : NSObject
  • OSSUtterance is a wrapper of the AVSpeechUtterance class.

    The OSSUtterance offers special overrides for strings which are usually set once objects.

    As the developer, you can override the volume, rate and pitchMultiplier should you wish to.

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Use OSSUtteranceConfiguration with OSSSpeechEngine.")
    public class OSSUtterance : AVSpeechUtterance
  • OSSVoice overides some of the properties provided to enable setting as well as getting.

    The purpose of this class is so that a single voice object can be set and reused through the Speech instance. Properties have been overriden for this very purpose.

    Setting the voice quality to be .enhanced instead of .default and the resetting of language after creation is not enabled in the AV provided API instance of AVSpeechSynthesisVoice.

    Note

    If init() is called, the default quality of OSSVoice will us “default” and the language will be “OSSVoiceEnum.UnitedStatesEnglish”.
    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Use OSSVoiceConfiguration, which resolves a real AVSpeechSynthesisVoice.")
    public class OSSVoice : AVSpeechSynthesisVoice, @unchecked Sendable