안드로이드, iOS, 웹 및 맥OS에서 텍스트 음성 변환(TTS) 기능을 가능하게 하는 플러터 플러그인입니다. 앱이 텍스트를 자연스러운 발성으로 변환할 수 있으며, 언어, 높낮이, 속도와 같은 사용자 정의 가능한 설정으로 음성 재생을 지원합니다. 접근성 기능, 음성 보조기, 상호작용 학습 앱에 이상적입니다. 플러터 생태계와 원활하게 통합되며 커뮤니티 기여를 위해 GitHub에서 유지 관리됩니다.
사용 사례
접근성 기능
음성 안내 내비게이션
상호작용 학습 앱
앱에서의 오디오 피드백
읽기 보조 도구
주요 기능
크로스 플랫폼 지원
사용자 정의 가능한 음성 매개변수
간단한 API 통합
다중 언어를 지원합니다
실시간 텍스트 변환
적합한 대상
접근성 있는 앱을 개발하는 개발자
교육 앱 제작자
음성 보조 기능 통합
음성 피드백이 필요한 앱
고려 사항
플랫폼별 권한이 필요합니다
일부 플랫폼에서 음성 선택이 제한됨
웹 지원은 브라우저에 따라 달라질 수 있습니다
성능은 장치의 TTS 엔진에 따라 달라집니다
언어 사용 가능 여부는 OS에 따라 다릅니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Text To Speech
A Flutter plugin provides TTS (Text-To-Speech) Service. This plugin aims to offer the most of TTS API feature from iOS, Android, web, and macOS.
Getting Started
To use this plugin, add text_to_speech as a dependency in your pubspec.yaml file:
dependencies:text_to_speech:^0.2.3
Installation
Android
Minimum SDK version: 21
Applications targeting SDK 30 (Android 11) need to declare TextToSpeech.Engine.INTENT_ACTION_TTS_SERVICE in the queries elements of Android Manifest (See Android documentation).
String text = "Hello, Good Morning!";
tts.speak(text);
Set Volume
Volume range: 0-1 where 0 is silence, and 1 is the maximum volume (the default behavior).
double volume = 1.0;
tts.setVolume(volume);
Set Rate
Rate range: 0-2.
1.0 is the normal and default speech rate. Lower values slow down the speech (0.5 is half the normal speech rate). Greater values accelerate it (2.0 is twice the normal speech rate).
double rate = 1.0;
tts.setRate(rate);
Set Pitch
Pitch range: 0-2.
1.0 is the normal pitch, lower values lower the tone of the synthesized voice, greater values increase it.
double pitch = 1.0;
tts.setPitch(pitch);
Set Language
Accepting locale tag name of specific language, e.g. 'en-US'. You can retrieve list of supported language using getLanguage function.
String language = 'en-US';
tts.setLanguage(language);
Get Languages
Provide list of supported language codes in locale tag name format, e.g. 'en-US'. You can get display name for specific language code
String language = 'en-US';
tts.setLanguage(language);
Get Voice
We can get all available voices or get voices of specific language. This function will returns particular voice name.