■ TextToSpeech 클래스의 GetLocalesAsync 정적 메소드를 사용해 특정 로케일로 텍스트를 음성으로 출력하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
IEnumerable<Locale> localeEnumerable = await TextToSpeech.GetLocalesAsync(); Locale locale = localeEnumerable.FirstOrDefault(); SpeechOptions options = new SpeechOptions() { Volume = .75f, Pitch = 1.0f, Locale = locale }; await TextToSpeech.SpeakAsync("Hello World", options); |