currentSTTModel static method

Future<ModelInfo?> currentSTTModel()

Get the currently loaded STT model as ModelInfo Matches Swift: RunAnywhere.currentSTTModel

Implementation

static Future<ModelInfo?> currentSTTModel() async {
  final modelId = currentSTTModelId;
  if (modelId == null) return null;
  final models = await availableModels();
  return models.cast<ModelInfo?>().firstWhere(
        (m) => m?.id == modelId,
        orElse: () => null,
      );
}