Google Android

Android TTS capabilities update

As it turns out, the state of TTS on Android has tended to what I proposed in an earlier post. With limited resources on handheld devices, TTS libraries had to resort to solutions other than a straight port of existing Java TTS libraries. The eyes-free project resorts to some offloading to a web server, while a more official solution comes from SVOX. See the announcement here. The SVOX solution is what Android really needs to make TTS a reality. The product is embedded and has been proven in other limited resource environments such as automobiles.

Text2Speech now hosted at Google Code

I've decided to open source the Text2Speech project for Android. The code can be found at http://code.google.com/p/android-text2speech/.

Text2Speech status 6/9/2008

The Text2Speech project has run into some obstacles. The amount of data required for voices combined with the limited processing power of the devices at which Android is targeted makes for some pretty tough hurdles.

Application developers are faced with a few options regarding speech. The first is pre-recorded audio, which is a piece of cake for most applications and a no-brainer. Why burden the device when you only have a small number of repeated phrases?

The second choice is Text2Speech. This is necessary for applications such as screen readers, navigation systems which speak names of streets. This is also where we run into limitations. An amount of optimization can be done at this stage. Also, mobile devices are always increasing in power and storage. So there is some hope yet and the Text2Speech project will continue. It will remain closed source for the immediate future.

Text2Speech API published

There has been a lot of interest in the Text2Speech for Android project. Work is still under way to make it functional and get a release out before the final submission date of the Android Developer Challenge.

The Text2Speech project is implemented as a service, meant to be used by any number of front-end applications. Some projects in process which can make use of the T2S service are: screen readers, navigation, and audible caller ID. In anticipation of an upcoming release, I wanted to make the interface into T2S available so that users can learn how to tie into it.

This code snippet shows an intent broadcast which will be picked up by the T2S receiver. The wrapper application itself was taken from an example and does nothing except for react to a key press.

package com.l1ghtm4n.text2speech;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;

public class Text2Speech extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
    }

	public boolean onKeyDown(int keyCode, KeyEvent event)
	{
		Intent intent = new Intent();
		
		intent.setClass(Text2Speech.this, com.l1ghtm4n.text2speech.SpeakReceiver.class);
		intent.setAction("com.l1ghtm4n.text2speech.ACTION_SPEAK");
		
		if (keyCode == android.view.KeyEvent.KEYCODE_DPAD_UP)
		{
			intent.putExtra("Content", (String)"This is my message");
			broadcastIntent(intent);
			return true;
		}
		
		return false;	
	}

}

Text2Speech for Android!

It's been about a month since I first started this project. I wanted to get familiar with Google Android by taking some existing Java code and porting it to the Android platform. I was also hoping to provide something actually useful in the Android environment. Hopefully this Text2Speech service is. It is entirely derived from FreeTTS.

Here I provide the code in hopes that some screen apps can make use of this service on the device. Examples could be an alarm which reads time, weather, and RSS feeds. Or an email reader.

I worked hard getting it to compile but ran into a bug in the Android SDK InputStream implementation. That's where it currently stands. If I have the time I will try to provide updates for it.

EDIT: Based on a lot of feedback from folks working on Android Developer Challenge submissions, I've decided to keep the source closed until the end of the challenge. If you would like to make use of the Text2Speech service within your application, please send me an email and let's work together.

Syndicate content