Module: mp.tasks.audio

MediaPipe Tasks Audio API.

Classes

class AudioClassifier: Class that performs audio classification on audio data.

class AudioClassifierOptions: Options for the audio classifier task.

class AudioClassifierResult: Contains the classification results of a model.

class AudioTranscriber: Performs streaming and unary speech-to-text transcription.

class AudioTranscriberOptions: Options for MediaPipe AudioTranscriber task.

class AudioTranscriberResult: Transcription result returned by AudioTranscriber.

class ModelArchitecture: Enum where members are also (and must be) ints

class RunningMode: MediaPipe audio task running mode.

class TextToSpeech: On-device speech synthesis via MediaPipe CalculatorGraph.

class TextToSpeechOptions: Options for MediaPipe TextToSpeech task.

class TranscriptionSegment: A single transcribed segment with start and end timestamps.

class TtsAudioResult: Synthesized audio chunk or full clip returned by TextToSpeech.

class TtsStream: Bidirectional streaming synthesis session supporting push_text().

class VoiceInfo: Metadata for a speaker voice available in a TTS model bundle.

class WordTimestamp: Word-level timing alignment mapping an input word to audio seconds.

Functions

compute_word_timestamps(...): Computes prosody- and waveform-aligned word timestamps via the C API.