FlutterBaiduTtsPlatform class abstract

The interface that platform implementations of flutter_baidu_tts must implement.

Every method resolves with the raw native payload — a {code, message, ...} map, where code == 0 means success. Native code never fails the channel call, so callers inspect code instead of catching a PlatformException. Use FlutterBaiduTts for the typed façade.

Inheritance
  • Object
  • PlatformInterface
  • FlutterBaiduTtsPlatform
Implementers

Constructors

FlutterBaiduTtsPlatform()
Constructs a FlutterBaiduTtsPlatform.

Properties

events → Stream
Broadcast stream of raw synthesizer callbacks.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCuid() → Future<String?>
从底层 SDK (SynthesizerTool.getCuid()) 获取设备 cuid。
getPlatformVersion() → Future<String?>
Human readable platform version, mainly useful as a channel smoke test.
initialize(BaiduTtsConfig config) → Future<Map<String, dynamic>?>
Creates the native synthesizer and loads the online (and optionally offline) engine using config.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → Future<Map<String, dynamic>?>
Pauses playback.
release() → Future<Map<String, dynamic>?>
Releases the native synthesizer. initialize must be called again before any further synthesis.
resume() → Future<Map<String, dynamic>?>
Resumes playback previously paused with pause.
speak(String text, {BaiduTtsMode mode = BaiduTtsMode.mix}) → Future<Map<String, dynamic>?>
Synthesizes text and plays it back through the SDK's audio player.
stop() → Future<Map<String, dynamic>?>
Stops playback and clears the synthesis queue.
synthesize(String text, {BaiduTtsMode mode = BaiduTtsMode.mix}) → Future<Map<String, dynamic>?>
Synthesizes text without playing it back.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ↔ FlutterBaiduTtsPlatform
The default instance of FlutterBaiduTtsPlatform to use.
getter/setter pair