Function get_default_voice_by_locale

Source
pub fn get_default_voice_by_locale(locale: &str) -> Option<&'static str>
Expand description

Returns the default voice for the given locale.

§Argument

locale: A locale code like en-US. Note that the country code is in uppercase and the language code is in lowercase.

§Returns

A Result that contains the default voice as a static string slice if the specified locale is valid. Otherwise, an AspeakError is returned.