/// <summary> /// Gets the AudioClip of the passed-in text being spoken in the desired language. /// </summary> /// <param name="text"></param> /// <param name="language"></param> /// <returns>Audio Clip of the text to be spoken.</returns> public static async Task <AudioClip> SpeakAsync(string text, TtsLanguageType language) { var query = $"{BaseEndpoint}/Speak?text={text}&language={languages[(int)language]}"; return(await Rest.GetAudioClipAsync(query, AudioType.WAV, ApiKeyHeader)); }