activeTtsSpec property

TtsModelSpec? get activeTtsSpec

The active TTS model's identity (TtsModelSpec), or null.

Implementation

static TtsModelSpec? get activeTtsSpec {
  final spec = FlutterGemmaPlugin.instance.modelManager.activeTtsModel;
  if (spec == null || spec is TtsModelSpec) {
    return spec as TtsModelSpec?;
  }
  gemmaLog(
    'activeTtsSpec: active TTS slot holds a ${spec.runtimeType}, '
    'not an TtsModelSpec — returning null (invariant violation).',
  );
  return null;
}