Greg, thank you for the answer, now I know the problem is on my side.

Yes I was able to write a file with OutputStreamWriter. Did it to /
data/data/[my_package_name]/files not to the /sdcard though.

The strange thing is that synthesizeToFile returns
TextToSpeech.SUCCESS, while LogCat reports an error saying
"android_tts_SynthProxy_synthesizeToFile(): error creating output
file".

I'll try using different AVD versions and investigate. Otherwise will
have to install API sources and see what's inside.





On Feb 22, 9:26 pm, greg <sep...@eduneer.com> wrote:
> Hi Dimitry,
>
> I think it's working (as I've used the same document you referenced to
> setup the emulator to write TTS output to a file).  Have you tried
> writing any file from your emulated application?   If your application
> also cannot write a file, perhaps the emulated SD card is not setup
> correctly.
>
> - Greg
>
> On Feb 22, 6:58 am, Dimitry Hristov <dima.hris...@gmail.com> wrote:
>
> > I'm following the official docs 
> > athttp://developer.android.com/resources/articles/tts.html
> > and trying to synthesize a String to a file:
>
> >         private OnClickListener saveBtnListener = new OnClickListener() {
> >                 @Override
> >                 public void onClick(View v) {
> >                         int x = mTts.synthesizeToFile("hello", null, 
> > "/asdcard/
> > wakeUp.wav");
>
> >                         if(x == TextToSpeech.SUCCESS) {
> >                                 Toast toast = Toast.makeText(context, 
> > "Saved "+x,
> > Toast.LENGTH_SHORT);
> >                                 toast.show();
> >                         }
> >                 }
> >         };
>
> > Then I run adb shell on the emulator to check if there is anything
> > saved to the file system. And there is nothing. I tried to save to non
> > existent folders, but synthesizeToFile still reports SUCCESS and
> > nothing new appears in the file system.
>
> > Am I missing something or synthesizeToFile is just not working?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to