Speech to Text Using Android SDK

Posted by Unknown Sabtu, 23 Maret 2013 0 komentar

Speech to Text using Android APIs


You can create a simple application using the google speech engine and convert the voice to text.

Create an android project and create the following res layout

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/textView1"
android:layout_toLeftOf="@+id/textView1"
android:gravity="center"
android:orientation="vertical" >

<ImageButton
android:id="@+id/btnSpeak"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
/>

<TextView
android:id="@+id/txtText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceLarge" />

</LinearLayout>

Now you can use the following activity code to add in your sample application.

package com.example.speech2text;

import java.util.ArrayList;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Bundle;
import android.speech.RecognizerIntent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity {

protected static final int RESULT_SPEECH = 1;

private ImageButton btnSpeak;
private TextView txtText;

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

txtText = (TextView) findViewById(R.id.txtText);

btnSpeak = (ImageButton) findViewById(R.id.btnSpeak);

btnSpeak.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {

Intent intent = new Intent(
RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");

try {
startActivityForResult(intent, RESULT_SPEECH);
txtText.setText("");
} catch (ActivityNotFoundException a) {
Toast t = Toast.makeText(getApplicationContext(),
"Opps! Your device doesn't support Speech to Text",
Toast.LENGTH_SHORT);
t.show();
}
}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

switch (requestCode) {
case RESULT_SPEECH: {
if (resultCode == RESULT_OK && null != data) {

ArrayList<String> text = data
.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);

txtText.setText(text.get(0));
}
break;
}

}
}
}





Baca Selengkapnya ....

Using Speech Engine in Android

Posted by Unknown Kamis, 21 Maret 2013 0 komentar

This post is focusing on speech engine in Android SDK. The TTS engine is very important component of the Android SDK and the Android 4.0 version has great APIs to write the custom TTS engines.

Here i am explaining a sample code to use the TTS engine in your android application.

Create the following layout in your android application.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent" >

<TextView android:id="@+id/msglabel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Enter some text in english:"
/>
<EditText android:id="@+id/inputtext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/speakenglish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="speak in english"
/>

</LinearLayout>


Here is the code of the sample speak activity you can just copy and paste this in your application project.

package com.example.speaksample;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;

import android.app.Activity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.view.View;
import android.widget.EditText;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.content.Intent;
import java.util.Locale;
import android.widget.Toast;

public class speaksample extends Activity implements OnClickListener, OnInitListener {
//Create the TTS object
private TextToSpeech TTSObject;
//status check code
private int DATA_CHECK_CODE = 0;
//create the Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_speaking_android);
//get a reference to the button element listed in the XML layout
Button speakButton = (Button)findViewById(R.id.speakenglish);
//set the click listener
speakButton.setOnClickListener(this);
//check for TTS data
Intent checkTTSIntent = new Intent();
checkTTSIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
startActivityForResult(checkTTSIntent, DATA_CHECK_CODE);
}
//respond to button clicks
public void onClick(View v) {
//get the text entered
EditText inputtext = (EditText)findViewById(R.id.inputtext);
String data = inputtext.getText().toString();
speakInEnglish(data);
}
//speak the user text
private void speakInEnglish(String speech) {
//speak straight away
TTSObject.speak(speech, TextToSpeech.QUEUE_FLUSH, null);
}
//act on result of TTS data check
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == DATA_CHECK_CODE) {
if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
//the user has the necessary data - create the TTS
TTSObject = new TextToSpeech(this, this);
}
else {
//no data - install it now
Intent installTTSIntent = new Intent();
installTTSIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
startActivity(installTTSIntent);
}
}
}
//setup TTS
public void onInit(int initStatus) {
//check for successful instantiation
if (initStatus == TextToSpeech.SUCCESS) {
if(TTSObject.isLanguageAvailable(Locale.US)==TextToSpeech.LANG_AVAILABLE)
TTSObject.setLanguage(Locale.US);
}
else if (initStatus == TextToSpeech.ERROR) {
Toast.makeText(this, "TTS engine fails", Toast.LENGTH_LONG).show();
}
}
}


If you like the code please share your feedback.

Thanks

Baca Selengkapnya ....

open a facebook page on browser in android

Posted by Unknown Rabu, 20 Maret 2013 0 komentar

Open a facebook page in Android Application

To open a facebook page in your android application you can create the following method and call this method in a class derived from activity

This will run the facebook page of the user in a different activity window.

public static Intent getOpenFacebookIntent(Activity acty,String szUserId,String szUserName) {

try {
acty.getBaseContext().getPackageManager().getPackageInfo("com.facebook.katana", 0);
return new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/" + szUserId));
} catch (Exception e) {
return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + szUserName));
}
}


If you like the code please provide your feedback.

Baca Selengkapnya ....

Android Read SMS

Posted by Unknown 0 komentar

Reading the SMS inbox from Android phone

Here is the quick way to read all the SMS stored in the inbox on android.

package com.csr.targetplus;

import java.util.List;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.database.Cursor;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import android.support.v4.app.NavUtils;

public class TargetPlus extends Activity {

private static final String TAG = null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView view = new TextView(this);
Uri uriSMSURI = Uri.parse("content://sms/inbox");
Cursor cur = getContentResolver().query(uriSMSURI, null, null, null,null);
String sms = "";
while (cur.moveToNext()) {
sms += "From :" + cur.getString(2) + " : " + cur.getString(11)+"\n";
}
view.setText(sms);
setContentView(view);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_target_plus, menu);
return true;
}


}




Baca Selengkapnya ....

Speed Up Your Computer with Run commands

Posted by Unknown Selasa, 19 Maret 2013 0 komentar


Speed Up Computer with Run commands


Learn how to speed up your computer with simple RUN commands.This can improve your PC processing speed and simultaneously you can save loading time of computer files like MP3 etc and system Drives.Before going to know the commands to operate let us know some of the mistakes we do that kills computer speed.

Avoid Doing this:

These are the most common mistakes that can kill the processing speed of the computer.So avoid those and gain the speed.
Never keep all the files/folders on the Desktop Screen.
Don't add too many side bar widgets.
Don't add animation images on Desktop.
Avoid too many Start Up programs.
Avoid keeping unused programs which occupies the disk space.

Follow these Steps:

Follow the steps given below to improve computer speed and keep your computer safe.
Use Strong anti-virus to keep away your computer from Mall-ware and spyware.
Never log out system with out closing all the applications and folders.
Use Disk space cleaner tools to free disk space.
If you want to delete a file permanently use SHIFT+DELETE
Don't open too many folders or application at once.
Most common but yet we should remember this Refresh the computer every time when you log in.This can be done either by Functional key F5 or right click on the desktop screen and then click "Refresh" option.

RUN COMMANDS TO SPEED UP COMPUTER:

Use the following run commands to remove the systems temporary and recent files whenever you feel that system is working slowly with that you can  improve computer  processing.

Open Run command and type the following commands one-by-one and delete those files and folders permanently from your computer.Some of the files won't delete then let it  be and skip those files.

Run commands:

Temp  
%Temp%
Recent 
Prefetch 
ipconfig







Baca Selengkapnya ....

Android Beam Mobile Phones

Posted by Unknown Senin, 18 Maret 2013 0 komentar
Android Beam : Android beam is the new concept which already known by a lot of people. The Beam is a new device which is used to use the internet connection. We have the beam internet connection in india as well as other parts of the world. So connecting the internet using the beam connection in android mobile phone is called as the android beam.

Android Beam

This is just my view on the concept. Please research before doing any act.

Baca Selengkapnya ....

online bullying Teenagers Victimised

Posted by Unknown Minggu, 17 Maret 2013 0 komentar

Teenagers are the biggest victims of online bullying, the majority of which takes place on popular social networking site Facebook, a new UK study has claimed.

After Facebook, Twitter was the next most frequent face for bullying - or trolling - to take place, according to the study of more than 2,000 teenagers by Opinium Research.

The study revealed that 85 per cent of 19-year-old men had experienced some form of online bullying.

Of those who admitted they had been bullied, 87 per cent said it had happened on Facebook, 19 per cent on Twitter and 13 per cent on BlackBerry Messenger.

Of all the teenagers who said they had been bullied, only 37 per cent had reported it to the social network where it took place.

Only 17 per cent said that their first reaction would be to tell their parents, and just 1 per cent said it would be to tell their teacher, The Telegraph reported.

The study was carried out for knowthenet.org.uk, a free online site offering advice on how to stay safe online.

Media psychologist Arthur Cassidy said online bullying could have a "massive impact" on older male teenagers.

"Suicide rates are particularly high amongst this demographic, so it's worrying to hear that teenagers on the whole are choosing to deal with internet abuse themselves

rather than speaking to parents or teachers for help," he said.

"Whilst some might expect girls to be more vulnerable online, this study shows that older boys are more at risk from trolling and cyber-bullying," he said.

Baca Selengkapnya ....

online bullying Teenagers Victimised

Posted by Unknown 0 komentar

Teenagers are the biggest victims of online bullying, the majority of which takes place on popular social networking site Facebook, a new UK study has claimed.

After Facebook, Twitter was the next most frequent face for bullying - or trolling - to take place, according to the study of more than 2,000 teenagers by Opinium Research.

The study revealed that 85 per cent of 19-year-old men had experienced some form of online bullying.

Of those who admitted they had been bullied, 87 per cent said it had happened on Facebook, 19 per cent on Twitter and 13 per cent on BlackBerry Messenger.

Of all the teenagers who said they had been bullied, only 37 per cent had reported it to the social network where it took place.

Only 17 per cent said that their first reaction would be to tell their parents, and just 1 per cent said it would be to tell their teacher, The Telegraph reported.

The study was carried out for knowthenet.org.uk, a free online site offering advice on how to stay safe online.

Media psychologist Arthur Cassidy said online bullying could have a "massive impact" on older male teenagers.

"Suicide rates are particularly high amongst this demographic, so it's worrying to hear that teenagers on the whole are choosing to deal with internet abuse themselves

rather than speaking to parents or teachers for help," he said.

"Whilst some might expect girls to be more vulnerable online, this study shows that older boys are more at risk from trolling and cyber-bullying," he said.

Baca Selengkapnya ....

Googles ChromeBook Pixels Google new laptop

Posted by Unknown Selasa, 12 Maret 2013 0 komentar
Google Chrome Book Pixel is the Google New Laptop : Google has released the new laptop to the next generation. The main feature of this is the clarity of the picture. With many more features the company has released this laptop at the price of $249.

For more information you can visit the following Official link :
http://www.google.com/intl/en/chrome/devices/chromebook-pixel/

Or
You can watch the videos of ChromeBook Pixel Here :


Chromebook: For Your Second One 









Baca Selengkapnya ....

Salman reveals the reason of Vidya marriage at STAR Guild Awards

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Bollywood Mimicry ever indian laughter Challenge

Posted by Unknown 0 komentar

Baca Selengkapnya ....

How To Get Paid Fee Apps for iOS 6.1.2 Without Jailbreak 6.1.2 iPhone

Posted by Unknown 0 komentar

Baca Selengkapnya ....

chhota bheem and the curse of damyaan

Posted by Unknown 0 komentar
Chhota Bheem and the curse of Damyaan : This is one of the favourite Child Movie by the hero Bheem Called as Chhota Bheem. He is well known to the word mostly to the children under the age 14 Years.

chhota bheem and the curse of damyaan


Baca Selengkapnya ....

TV9 - Jurnlist Dairy part 1

Posted by Unknown Senin, 11 Maret 2013 0 komentar

Baca Selengkapnya ....

KCR No Confidance Motion - TV5

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Shah Rukh Khan REVEALS Daughter Suhana's Top Bollywood Qualities!! - UTV...

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Allah Duhai Hai - Race 2 - Official Video Song - Atif Aslam -

Posted by Unknown 0 komentar

Baca Selengkapnya ....

pakistani desi bhabhi goes smart !!!

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Bipasha Basu Promotes 'Aatma' on 'India's Best Dramebaaz' show

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Dangerous Khiladi South Superhit Movie in Hindi Part 1- Allu Arjun, Ilea...

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Allu explains painting scene - Jokes in Telugu - Paramanadayya Sisyula K...

Posted by Unknown 0 komentar

Baca Selengkapnya ....

My Kids Do This! (Response to My Parents Do This)

Posted by Unknown 0 komentar

Baca Selengkapnya ....

How to Dance at Parties

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Top 3 Bollywood News in 1 minute - 11-03-13

Posted by Unknown 0 komentar

Baca Selengkapnya ....

TV Actors Turned Bollywood Stars

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Bollywood Bulletin March 08 '13 Part - 4

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Swamy Ra Ra - Telugu Movie Theatrical Trailer - Nikhil Sidharth, Swathi,

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Mirchi Movie | Prabhas Fight Scene

Posted by Unknown 0 komentar

Baca Selengkapnya ....

BEAUTIFUL tornado in New Zealand!! January 3, 2013

Posted by Unknown 0 komentar

Baca Selengkapnya ....

How To Make a Paper Jumping Frog

Posted by Unknown 0 komentar

Baca Selengkapnya ....

world most funny video ever

Posted by Unknown 0 komentar

Baca Selengkapnya ....

kapil with ankita as blindman and student

Posted by Unknown 0 komentar

Baca Selengkapnya ....

kapil as dongi funny baba with sumona

Posted by Unknown 0 komentar

Baca Selengkapnya ....

kapil as pregnant father best comedy

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Lat Lag Gayee - Race 2 - Official Song Video - Saif Ali Khan & Jacqueline Fernandez

Posted by Unknown 0 komentar

Baca Selengkapnya ....

Earn money online without investment - Clixsense (PTC Site) Paid Since 2007

Posted by Unknown Minggu, 03 Maret 2013 0 komentar


How to earn money online without investment - Clixsense Paid Since 2007

Picture

Step 1: Click the above button ''click here'' button.
Step 2: A new page will open, Fill the form and sign up. 
Step 3: During registration fill all the details and click 'Signup Now' (example)
Step 4: Now Login to your email and click on the validation link.
Step 5: Login and click ads to start earning (As shown in this video) 
Watch this video !

How will I receive payments?

After earning money on Clixsense, you can transfer it to your bank account using alertpay or paypal. Clixsense will send your earnings to your alertpay/paypal account first, from there you can transfer the money to your bank. If you don't have alertpay/pp account, you can create it easily by going to payza.com (or) paypal.com. It is absolutely free. Alertpay/Paypal is like an online bank, which allows you to send and receive payments using the internet.

How Does Clixsense Work :

ClixSense is one of the oldest and most trusted Paid-to-Click(PTC Advertising) websites online  paying since February 2007 .This is the Top Most and No 1 PTC In the World . ClixSense is online advertising program, where as a member you can get paid for visiting ads, up to $0.02 for every website visited. Clixsense is Six years old and paying PTC site, created by Steven Girsky (old owner) in February, 2007.  Clixsense is well managed and established site, one of the most popular in the PTC world. They have paid more than $3 million of dollars to their 2.5 million members.

You can see their success stories and payment proofs in the forum. Also if you do a google search for "ClixSense review" you come back with plenty of pages of people telling how they have made money and been paid from this company.

 Why Clixsense : 

  • Well Managed Site – The site has been online for over 5 years. For a PTC site, it is very important how long it has been online and paying. Many sites will paying at the beginning, then stop paying after the first few months. ClixSense has passed the test of time and they are providing their services for over 5 years without any problems.
  • Paying as Promised – Members are paid on time. Payments are send on every Monday and Friday afternoon EST (Eastern Standard Time). We were paid by Clixsense a few times.
  • Tasks - You Can Earn More By doing the Simple tasks .These tasks are Crowdflower tasks which is No 1 in the tasks section.For every $50 you earn working on tasks you will get $5 Bonus that is instantly credited to your account’s balance.
  • Offers
  • Forum
Members Bebefits :

Visiting Websites       
Taking Surveys
Completing Offers     
Completing Tasks
Playing ClixGrid       
Contests
Shopping Online   
Referring Others.

So Sign Up Today and earn upto $100 for a month by clicking the ads , completing the offers , performing the tasks , playing clixgrid , playing games , contests etc many more .

Hurry Up Sign Up Today .Click below the button.


Picture


Baca Selengkapnya ....

Ubuntu Mobile OS on Nexus

Posted by Unknown Jumat, 01 Maret 2013 0 komentar
Google Nexus  Ubuntu Mobile OS for phones and tablets, but it is currently not in its finished state. If you’re itching to flash your shiny Nexus phone or tablet with this early developer build, there are a number of things that you must keep in mind before you begin the process of giving your device a new soul.

Compatibility:
Currently, the “Touch Developer Preview for Ubuntu” is only compatible with Google Nexus devices, but each device must be running a specific version of the firmware. Here is a neat little tablet that shows the various devices and the required firmware.

Baca Selengkapnya ....

world's first smart ATM by Diebold

Posted by Unknown 0 komentar

Diebold, announced the launch of the world's first smart automated teller machine (ATM), the Diebold 429. This machine is specifically designed to meet the increasing demand for a robust self-service terminal in urban and rural areas of India. Built with a power management system, it automatically switches between three possible power sources (solar panel, alternating current (AC) grid and internal battery), maximizing terminal uptime, lowering total cost of ownership.


By utilizing alternative power sources, such as solar panels and an AC grid, the Diebold 429 is highly efficient, consuming approximately 40% less energy than the previous generation of cash dispensers available in the Indian market. In addition, the self-service terminal has an integrated four-hour battery backup for reliability.

The Diebold 429 is equipped with an optional single-note acceptor (SNA) that enables small-volume currency deposits and bill payments at the ATM, improving speed and convenience. It also has a wide set of security features—including Europay, MasterCard and Visa (EMV) card reader, biometric technology and provision for dual security cameras. It complies with the latest National Payments Corporation of India (NPCI) regulatory requirements.

"The Diebold 429 ATM is especially designed to meet the growing demand for the expansion of banking services in India," said Wico van Genderen, vice president, Diebold Asia Pacific. "This new terminal will enable financial institutions to deploy ATMs across a wide range of rural and urban locations that could not previously be reached due to economic or technical constraints. This ATM will meet the needs of many deployers in India and other emerging economies globally facing similar challenges, while also enhancing security, functionalities and availability to the end users."

Diebold specialises in integrated self-service delivery and security systems and services. It employs approximately 17,000 associates with representation in nearly 90 countries worldwide and is headquartered in the Canton, Ohio region, USA.

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of apk xda.