Code example for TextToSpeech

Methods: synthesizeToFile

0
             public void onClick(View v)  
             {  
                 // TODO Auto-generated method stub  
                   
                 //��EditText�������ݱ���Ϊ�����ļ�  
                 int r = mTextToSpeech.synthesizeToFile(mEditText.getText().toString(), null, "/sdcard/speak.wav"); 
                 if(r == TextToSpeech.SUCCESS) 
                     displayToast("�����ɹ���");                  
             }  
         });  
         //EditText���ݱ仯����  
         mEditText.addTextChangedListener(mTextWatcher); 
           
     }  
       
       
     private TextWatcher mTextWatcher = new TextWatcher() 
     {  
   
         @Override  
         public void afterTextChanged(Editable s)