mediapipe_audio 0.5.0
mediapipe_audio: ^0.5.0 copied to clipboard
Google's MediaPipe Audio Classifier (every platform and the web), Audio Transcriber and Text to Speech for Flutter, with Google's pinned models.
0.5.0 #
- Upgrade every mediapipe package to 0.5.0 together, so this package now
requires
mediapipe_core^0.5.0, which pins Google's Windows arm64 libraries. MediaPipe stays at 1.2.3. - Adds Windows arm64: Audio Classifier, Audio Transcriber and Text to Speech run there on the CPU, as on Windows x64.
- CI runs every audio task on GitHub's
windows-11-armrunners, against references from Google'swin_arm64Python wheels. - YAMNet now downloads from Google's LiteRT community on Hugging Face
(
huggingface.co/litert-community), pinned to a fixed revision, instead of Google'sstorage.googleapis.com/mediapipe-modelsbucket. The file is byte-identical, so its SHA-256 pin is unchanged.
0.4.1 #
- Upgrade every mediapipe package to 0.4.1 together, so this package now
requires
mediapipe_core^0.4.1. MediaPipe stays at 1.2.3. - No change to this package's tasks. On Linux arm64 a GPU request for the speech tasks fails with a reason that names the task rather than every task, since four vision tasks now run on the GPU there.
0.4.0 #
- Upgrade every mediapipe package to 0.4.0 together, so this package now
requires
mediapipe_core^0.4.0, which pins Google's Linux arm64 libraries. MediaPipe stays at 1.2.3. - Adds Linux arm64 (aarch64): every audio task, Audio Transcriber and Text to Speech run there on the CPU. A GPU request for the speech tasks fails there with a clear reason.
- Linux arm64 needs glibc 2.27 or later (Raspberry Pi OS Bullseye,
Ubuntu 18.04 and later) and, even on the CPU, EGL and OpenGL ES:
sudo apt-get install libegl1 libgles2, which Raspberry Pi OS Lite lacks. Google's library uses Arm's LSE atomic and RCPC load instructions, so it needs a Raspberry Pi 5 (Cortex-A76, ARMv8.2) or newer: on a Pi 4 or older (Cortex-A72 or earlier) it stops with an illegal instruction. - CI runs every audio task on GitHub's
ubuntu-24.04-armrunners, against references from Google's aarch64 Python wheel. - The package is now licensed under Apache 2.0, like the rest of the repository, in place of BSD-3-Clause. Releases up to 0.3.0 keep BSD-3-Clause.
0.3.0 #
- Upgrade every mediapipe package to 0.3.0 together. MediaPipe 1.2.3
changes the layout of the native option structs, so this package now
requires
mediapipe_core^0.3.0. - Runs Google's MediaPipe 1.2.3 instead of 1.2.2, with new SHA-256 pins for its native libraries.
- Text to Speech word indices in the browser stay correct UTF-16 indices on Google's 1.2.3 web runtime, which changed their unit from UTF-8 bytes to UTF-16 indices.
- Accepts Flutter 3.44 and newer, down from 3.47. The package accepts the
dependency versions Flutter 3.44 resolves, from
hooks2.0.0,code_assets1.1.0 andnative_toolchain_c0.19.0. iOS and macOS builds with Xcode 27 need Flutter 3.47 or later. - CI tests the package on Flutter 3.50.0, the latest stable release, instead of 3.47.9.
- The README's Audio Transcriber sample for a clip only transcribes: it no
longer ends with a
speak()function, which is Text to Speech code, as Google's Audio Transcriber guide shows it. The Speech section keeps its own Text to Speech samples.
0.2.1 #
- The README has complete samples for live transcription with interim
results,
prewarm(), streamed speech with word timestamps and a stop, and choosing a voice for a locale withlistVoices()andcancel(). It also describesmodelArchitecture,prompt,cacheDirectory,defaultVoiceId,speakingRateandtargetBucket. synthesizeStream's doc comment and the README say that it yields short chunks (80 to 320 ms of audio each with Phonon) rather than one per clause.
0.2.0 #
- Audio Transcriber: speech to text on Google's 1.2.2 native library, with
AudioModels.parakeetTdtV3(Parakeet TDT 0.6B v3), whole clips or blocks ending infinishStream(), optional interim results, and segment timestamps. - Text to Speech:
synthesizeandsynthesizeStreamwithAudioModels.phonon(five US English voices), speaking rate, voice and locale per call, and word timestamps. - Text to Speech
cancel(), like Google's: a cancelledsynthesizecall fails with status 1, a cancelled stream closes cleanly, and cancelling asynthesizeStreamsubscription stops Google's stream at once (in browsers, between its chunks). TextToSpeechOptions.defaultLocaleis null by default, so Google infers the locale from the voice, as its Web, Android and iOS tasks do, and a Kokoro voice in another language needs no locale (Google refuses it inen-US).- Text to Speech also speaks US English with Kyutai's PocketTTS
(
AudioModels.pocketTtsEn, CC BY 4.0) on the CPU. - Text to Speech also pins hexgrad's Kokoro 82M (
AudioModels.kokoro, Apache 2.0) in eight languages: the file Google's guide uses with the GPU delegate, whose speech may be noisier on the CPU. - Both run on the CPU on 64-bit Android, iOS, macOS, Linux and Windows, and
in browsers on
@mediapipe/tasks-audio1.2.2, each on a web worker; 32-bit Android reports them unavailable. - Audio Transcriber also offers the GPU delegate where a test saw the GPU do
the work: macOS, which CI checks on macOS 15, Chromium on a Mac's Apple
WebGPU adapter, which CI checks on macOS 15, and WebKit on that adapter,
checked on a developer's Mac. iPhones and iPads are offered Metal too,
tested on one iPhone 15 Pro (iOS 27): the same transcript as the CPU, about
1.7x faster per clip, but about 578 MB of GPU memory and about 4.6 s to
create (0.6 s on the CPU). iPads and older iPhones were not tested. Other
browsers and other adapters get the CPU, and a reason. Text to Speech offers
the GPU on macOS 15 and later for Kokoro (
AudioModels.kokoro). - On Linux, Text to Speech checks first that the model path is a file and
throws a
TaskException(NOT_FOUND, 5) for every path that is not: there Google's library ends the process for a missing Phonon or PocketTTS file and for a directory with Phonon's file name, and returns 2 for a directory with Kokoro's file name. AudioTranscriberOptions.sampleRateHzof 0 means 16000, as in Google's API, and a negative rate throws anArgumentError.- Google's 1.2.2 native library replaces 1.2.0, and
@mediapipe/tasks-audio1.2.2 replaces 1.2.0-rc.20261018 in browsers.
0.1.4 #
- No changes to this package. It is released with
mediapipe_core0.1.4 so that all the packages keep one version.
0.1.3 #
- The README has an installation section using
flutter pub add. - With
mediapipe_core0.1.3, downloads of models and native libraries wait out short network failures.
0.1.2 #
Release 0.1.2.
0.1.1 #
Adds Google's NOTICE at the package root.
0.1.0 #
The first release.
- Audio Classifier on Android, iOS, macOS, Linux, Windows and the web,
through Google's official runtimes, classifying PCM clips (
AudioData, with a WAV decoder) at any sample rate. - On 32-bit Android (armeabi-v7a) the Audio Classifier runs on the CPU.
- Audio stream mode on every platform:
AudioClassifierOptions(runningMode: AudioRunningMode.audioStream)creates a task that takes blocks of any length withclassifyAsync(block, timestampMilliseconds:)and delivers one result per model window onresults, stamped with where the window's audio starts;dispose()classifies the tail. Google's own stream runs it on Android, iOS, macOS, Linux and Windows; in browsers, where Google has none, the package emulates it on Google's clips mode. The rate, channel and timestamp checks run in Dart with one message on every platform. Outside browsers at most 64 streams can be open at once.classifyon a stream task, andclassifyAsyncorresultson a clips task, throwStateError. AudioClassifierResulthasclassifications(oneClassificationsper model head) andtimestampMilliseconds.AudioClassifierOptionsextends core'sTaskOptionswith Google's classifier settings andrunningMode.AudioModels.byNamenames YAMNet forhooks.user_defines.mediapipe_audio.models, whichdart run mediapipe_core:bundle_modelsbundles into the app.model:uses the bundled copy and downloads at run time only whenModelStore.allowDownloadsis true; app-supplied paths and bytes work too.