Text to speech library on Android...

by Wesley Sagittarius » Mon, 16 Jun 2008 14:35:20 GMT


Sponsored Links
 hi,

any idea where can I get Text to speech library???

or how can I start on Text to speech library???


Wesley.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Flickering camera preview in SurfaceView

Hi,

I have an Dialog with a custom view. This view has a SurfaceView which
shows a camera preview. However, the preview is very flickering.

The taken photo does not contain flicker. It looks as it should.

Why does the preview flicker? (The camera does work :-) )

This is my custom view:
---------

public class CameraView extends LinearLayout implements
SurfaceHolder.Callback, OnClickListener, PictureCallback {

        private SurfaceView surfView;
        private SurfaceHolder previewHolder;
        private Camera camera;
        OnProfilePictureTakenListener onProfilePictureTakenListener = null;

        public CameraView(Context context) {
                super(context);
                setOnClickListener(this);
                surfView = new SurfaceView(getContext());
                addView(surfView);
                previewHolder = surfView.getHolder();
                previewHolder.addCallback(this);
                previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        }

        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int
width,
                        int height) {
                Camera.Parameters parameters = camera.getParameters();
                parameters.setPreviewSize(width, height);
                parameters.setPictureFormat(PixelFormat.JPEG);
                camera.setParameters(parameters);
                camera.startPreview();
        }

        @Override
        public void surfaceCreated(SurfaceHolder holder) {
                camera = Camera.open();
                try {
                        camera.setPreviewDisplay(previewHolder);
                } catch(Throwable t) {
                        Log.e("surfaceCallback", "Exception", t);
                        Toast.makeText(getContext(), t.getMessage(), 
Toast.LENGTH_LONG).show
();
                }
        }

        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
                camera.stopPreview();
                camera.release();
                camera = null;
        }

        @Override
        public void onClick(View v) {
                takePicture();
        }

        private void takePicture() {
                camera.stopPreview();
                camera.takePicture(null, null, this);
        }

        @Override
        public void onPictureTaken(byte[] data, Camera camera) {
                new SavePhotoTask().execute(data);
                camera.startPreview();
        }

        public void setOnPictureTakenListener(OnProfilePictureTakenListener
lis) {
                onProfilePictureTakenListener = lis;
        }

        class SavePhotoTask extends AsyncTask<byte[], String, String> {

                @Override
                protected String doInBackground(byte[]... jpeg) {
                        File photo = new 
File(Environment.getExternalStorageDirectory(),
"/.addMePictures/" + System.currentTimeMillis());
                        if(photo.exists()) {
                                photo.delete();
                        }
                        try {
                                FileOutputStream fos = new 
FileOutputStream(photo.getPath());
                                fos.write(jpeg[0]);
                                fos.close();
                        } catch(IOException e) {
                                e.printStackTrace();
                        }
                        if(onProfilePictureTakenListener != null) {
                                
onProfilePictureTakenListener.onProfilePictureTaken(photo);
                        }
                        return null;
                }

        }

        public interface OnProfilePictureTakenListener {
                public abstract void onProfilePictureTaken(File imgFile);
        }

}


--------

Thank you very much!

//Kaloer

-- 

2. Market T Mobile Carrier Billing

kabarnya sdh ada update market yg memberikan kita pilihan untuk membayar 
aplikasi lewat billing operator (hanya di t mobile)..klo gini ga repot 
nih...siap2 bubye app retakan..going to legite...lol..

Semudah pasang RBT ...

Hayoo operator indo..majuuuuuuu....perjuangkan gms dan carrier billing di 
market...doh!
--
Sent from my Android phone with K-9. Please excuse my brevity.

-- 
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. Getting hold of PreferenceActivity Views from the xml file

4. Updating my calendar

5. Cannot build Android source in Ubuntu

6. Your Best App?

7. ROM : Cyanogen V.4.2.8 is OUT!!! :D