tts 가 한글을 지원한다고 하여 앱을 개발하려하는데
tts에서 읽은 음성을 파일형태로 저장하고 싶습니다.
좋은 자문 부탁드립니다.
코드
package my.speaking;
import java.util.*;
import android.app.Activity;
import android.os.Bundle;
import android.speech.tts.*;
import android.widget.*;
public class SpeakingActivity extends Activity {
/** Called when the activity is first created. */
TextToSpeech tts;
TextView mTextView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTextView = (TextView)findViewById(R.id.text);
tts = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
// TODO Auto-generated method stub
mTextView.setText("시작");
String speech1 = "전화가 왔습니다.";
tts.setLanguage(Locale.KOREAN);
tts.speak(speech1, TextToSpeech.QUEUE_FLUSH, null);
}
});
}
}