MediaPipeTasksAudio Framework Reference

Structures

The following declarations are available globally.

  • Incremental mono PCM audio chunk emitted by TextToSpeech.synthesizeStream(_:options:).

    Declaration

    Swift

    struct AudioChunk: Sendable, Equatable
  • Configuration for an AudioClassifier instance.

    Not Equatable or Hashable because audioStreamResultHandler is a closure.

    Declaration

    Swift

    struct AudioClassifierOptions: Sendable
  • Predictions produced across one or more audio windows.

    Declaration

    Swift

    struct AudioClassifierResult: Sendable, Equatable, Hashable
  • Self-contained mono PCM audio buffer returned by TextToSpeech.synthesize(_:options:).

    Declaration

    Swift

    struct AudioResult: Sendable, Equatable
  • Configuration options for initializing a MediaPipe AudioTranscriber task.

    Declaration

    Swift

    struct AudioTranscriberOptions: Sendable, Equatable, Hashable
  • Transcription output returned by AudioTranscriber for an audio chunk or stream flush.

    Declaration

    Swift

    struct AudioTranscriberResult: Sendable, Equatable, Hashable
  • Per-utterance synthesis overrides passed to TextToSpeech.synthesize(_:options:) and TextToSpeech.synthesizeStream(_:options:). Both fields default to nil so non-English voices (e.g. "ef_dora", "zf_xiaobei") automatically infer their native language from the voice metadata.

    Declaration

    Swift

    struct SynthesisOptions: Sendable, Equatable
  • MediaPipe Tasks-harmonized base options for .litertlm model loading and hardware delegation.

    Declaration

    Swift

    struct TTSBaseOptions: Sendable, Equatable
  • Task initialization options for TextToSpeech (backed by LiteRT-LM Omni Kokoro-82M).

    Declaration

    Swift

    struct TextToSpeechOptions: Sendable, Equatable
  • A single interim or finalized transcript span produced by AudioTranscriber.

    Declaration

    Swift

    struct TranscriptionSegment: Sendable, Equatable, Hashable
  • Voice metadata descriptor returned by TextToSpeech.listVoices().

    Declaration

    Swift

    struct VoiceInfo: Sendable, Equatable
  • Word-level timing alignment mapping an input word to audio seconds.

    Declaration

    Swift

    struct WordTimestamp: Sendable, Equatable