platform_interface library
Where the browser plugin plugs Google's JavaScript runtime into the audio tasks, and the hooks the repository's device tests read.
Applications should import mediapipe_audio.dart instead.
Classes
- AudioTaskBackend
- Google's Audio Classifier, created and run by a platform backend.
- AudioTranscriberRunner
- Audio Transcriber's requests, run in call order.
- TextToSpeechRunner
- Text to Speech's requests, run in call order.
Properties
-
audioTaskBackendFactory
↔ Future<
AudioTaskBackend> Function(Map<String, Object?> options)? -
Creates Google's Audio Classifier from
optionsnamed as in Google's JavaScript API, plusmodelBytes(aUint8List) ormodelPath(a URL).getter/setter pair -
audioTranscriberOpener
↔ Future<
AudioTranscriberRunner> Function(AudioTranscriberOptions options)? -
Opens Google's Audio Transcriber in browsers; null elsewhere, where the
package opens Google's native task itself.
getter/setter pair
- browserOnMac ↔ bool
-
Whether the browser runs on a Mac, which its WebGPU adapter does not say:
Safari names the same adapter on iPhones and iPads.
getter/setter pair
- debugGoogleStreamTimestamp ↔ void Function(int timestampMilliseconds)?
-
Test hook: called with every timestamp Google's own stream delivers, before
the tail's sentinel is replaced, so that a test can show a result came from
Google's flush. Null outside tests.
getter/setter pair
-
textToSpeechOpener
↔ Future<
TextToSpeechRunner> Function(TextToSpeechOptions options)? -
Opens Google's Text to Speech in browsers; null elsewhere, where the
package opens Google's native task itself.
getter/setter pair