setTTSVoiceByLanguage static method
- Language language
Set the current TTS (computer) voice used for text-to-speech instructions.
The best voice is selected based on the provided language.
Parameters
- IN language The voice language.
Returns
- GemError.success on success, otherwise see GemError for other values.
Throws
- An exception if it fails.
Implementation
static GemError setTTSVoiceByLanguage(Language language) {
final OperationResult resultString = objectMethod(
0,
'SdkSettings',
'setVoice',
args: <String, String>{
'languageCode': language.languagecode,
'regionCode': language.regioncode,
},
);
return GemErrorExtension.fromCode(resultString['result']);
}