Dedicated to satisfying your computer needs

twitter button digg button
Subscribe to Blog
Subscribe via email Subscribe via RSS Subscribe via Comments

Text to Speech for the Google OS, Android (Updated)

Posted by Michael Washington On April - 10 - 2009

Text to Speech in Android

Version of android executed in: 1.6rc2 in Windows


TOOLS we used:

Eclipse and Android library 1.6rc2

How it works:

1. In android 1.6rc2 the text to speech library is built in called android.speech.tts, here is link for the information http://developer.android.com/reference/android/speech/tts/TextToSpeech.html

2. Here is the code

package com.android;

import java.util.Locale;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;

public class TtS extends Activity implements OnInitListener{
/** Called when the activity is first created. */
private TextToSpeech mTts;

int MY_DATA_CHECK_CODE = 0;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Intent checkIntent = new Intent();
checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);
mTts = new TextToSpeech(this,this);

}

@Override
public void onInit(int arg0) {
// TODO Auto-generated method stub
String myText1 = “Did you sleep well?”;
String myText2 = “I hope so, because it’s time to wake up.”;
mTts.setLanguage(Locale.US);
mTts.speak(myText1, TextToSpeech.QUEUE_FLUSH, null);
mTts.speak(myText2, TextToSpeech.QUEUE_ADD, null);
}

}

3. To make it even easier you can use you can download the code and open as an existing project. Click here to download.

References:

  1. http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html

Bookmark and Share

Popularity: 53% [?]

Test out your Programming Skills

Posted by Michael Washington On February - 18 - 2009

question

Every now and then you need to tune up your programming skills. Even football players have to keep lifting to keep their level of strength.  So as a programmer what do you to keep your level of skill or raise your level of skill? Well I have the answer for you. These are a list of some very good websites to take your programming level too the next level.

These problems should definitely get your brain going, if these problems are not big enough for you, you can always solve this problem. Tell me how it goes, lol.

Bookmark and Share

Popularity: 25% [?]

As a developer it is always good to keep up with trends and have an understanding of the direction the field of computer science or web development is moving. Recently I have started to notice just how many thin client applications that are out there that do the exact same thing as many thick client applications. Now for those who don’t know what I’m talking about in terms of thin and thick client apps let me break it down a little.

Thick client applications are your traditional applications. These are the software that you go out and buy from the store then download onto your computer from a CD like Quicken or MS Office. Such applications are then stored on your personal computer’s hard drive taking up memory and runs completely on that computer’s resources. This also means that the security of the application is dependent on the local computer, which in most cases has a limited amount of users and access. These apps, because they are stored on a person’s local computer, are always readily available as long as there are no issues with the computer housing them. This also means that the only way to us such an application from a different computer is that it has to be loaded on that machine, and an individual would have to have there information on some kind of portable media so that it can be uploaded an reused. That means these kinds of apps are not very portable and in most cases can not be used with a mobile device.


Thin client applications are web applications. These are applications that can be accessed from the internet with out the use of a CD or any other type of media. These applications are purchased by paying for an account or subscription to a website which gives you access to the app, as opposed to purchasing it at a store. With the application itself being used from the web it dose not take up any space on the local computer, but still uses other resources from the local computer. Instead the app resides on a server somewhere that can be accessed by many users at any time, which means a need for greater security measures to be taken. Also thin client apps can be accessed by any computer or mobile device that has internet access making them very portable. With that said thin apps are only as fast and reliable as the user’s internet connection and the producer’s server. This also means that if either is not working correctly for any reason then the application could be unreachable or extremely slow.

Now with a better understanding and some background information of what is a thin client and thick client app, I go back to the original questing of which one is better? Well that’s a tough question because at the end of the day they both do the same job and usually cost about the same. Even though thin apps are easier to access and do not take up any memory of the local computer, thick apps are more reliable and usually a lot more secure. Thus I think the best way to answer this question is for users to first decide how big of an issue accessibility is. If it is a big issue for the user then yes, a thin client app is defiantly better. Yet, if that is not the case then maybe a thick client app is better. It all depends on what the user is looking for out of their apps. If you have any questions and want to know more about thick and thin client apps you can e-mail me at me_conwell@compscistuff.com.

Also a side note: Thin client apps are the basis of cloud computing, which is the idea of a computer running with its apps being ran from a remote server as opposed to on the local computer itself. This is an Idea that will be further explored in a later article so being on the look out.

Bookmark and Share

Popularity: 69% [?]