getVoices method

Future<List<Map<String, String>>> getVoices()

Implementation

Future<List<Map<String, String>>> getVoices() async {
  var tmpVoices = synth.callMethod("getVoices") as List<dynamic>;
  var voiceList = <Map<String, String>>[];
  for (var voice in tmpVoices) {
    voiceList.add({
      "name": voice["name"] as String,
      "locale": voice["lang"] as String,
    });
  }
  return voiceList;
}