Hi Steve, In the mean-time I managed to convert a ByteArrayInputStream to an AndroidAudioInputStream, but there too, playing the beast without resorting to temporary audio files is not that straightforward, it seems. Of course it depends on the unspecified efficiency of the lower level implementations (these could in theory cache everything), but by default I'd expect that using temporary audio files would give poor response times. The FreeTTS work might give indications of responsiveness, but even there one will have to wait for actual devices before one really knows. From what I've read, I think for Android one currently needs to jump through the SourceDataLine hoops to get the job done without using temporary audio files, but it is quite a bit of code mess to accomplish something that ought to have been almost trivial, namely playing an audio-formatted byte array.
Overall it rather looks like the Android API designers only had fixed file paths and URLs and fixed resources in mind. If they read this (I hope they do), they might decide to add direct API support for playing data arrays (or their associated streams, as with ByteArrayInputStream), both to javax.sound.sampled.AndroidPlayBackEngine and to android.media.MediaPlayer to make multimedia programming life less miserable, and perhaps better matched to what already works in Java ME (apart from the firmware bugs in actual phones that are also making me look at Android as a possibly less fragmented platform of the future). Peter On Jun 2, 5:15 am, Steve Oldmeadow <[EMAIL PROTECTED]> wrote: > @blindfold. I remember seeing some people posting about converting > FreeTTS to work in Android and having some success rendering the > spoken text to a wave file that they could play in Android. > > Maybe you should speak with these people as it sounds like you have > some common interests. > > Is there any reason you have to use a ByteArrayInputStream? I assume > you just want the ability to synthesize an audio stream on the fly? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

