{"id":307,"date":"2010-09-23T23:33:00","date_gmt":"2010-09-23T23:33:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/android-text-to-speech-application.html"},"modified":"2019-12-02T16:38:54","modified_gmt":"2019-12-02T14:38:54","slug":"android-text-to-speech-application","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html","title":{"rendered":"Android Text-To-Speech Application"},"content":{"rendered":"<p>One of the many features that Android provides out of the box is the one of \u201c<a href=\"http:\/\/en.wikipedia.org\/wiki\/Speech_synthesis\">speech synthesis<\/a>\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly the capability of the device to \u201cspeak\u201d text of different languages. This feature was introduced in version 1.6 of the Android platform and you can find an <a href=\"http:\/\/android-developers.blogspot.com\/2009\/09\/introduction-to-text-to-speech-in.html\">introductory article<\/a> at the <a href=\"http:\/\/android-developers.blogspot.com\/\">official Android-Developers blog<\/a>. In this tutorial I am going to show you how to quickly introduce TTS capabilities into your application. Let&#8217;s get started by creating a new Eclipse project under the name \u201cAndroidTextToSpeechProject\u201d as shown in the following image: <a href=\"http:\/\/2.bp.blogspot.com\/_piNjpdpJZXA\/TJu2gair2xI\/AAAAAAAAAJA\/5wik0mFexus\/s1600\/01-new-project-tts.png\"><img decoding=\"async\" style=\"cursor: pointer; height: 320px; margin: 0px auto 10px; text-align: center; width: 274px;\" src=\"http:\/\/2.bp.blogspot.com\/_piNjpdpJZXA\/TJu2gair2xI\/AAAAAAAAAJA\/5wik0mFexus\/s320\/01-new-project-tts.png\" alt=\"\" border=\"0\"><\/a> Note that Android 1.6 was used as the build target and that for the minimum SDK version I used the value 4, since this functionality is not provided by the previous versions. The first step to use the TTS API is to check if it is actually supported by the device. For that purpose there is a special action named <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.Engine.html#ACTION_CHECK_TTS_DATA\">ACTION_CHECK_TTS_DATA<\/a> which is included in the <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.Engine.html\">TextToSpeech.Engine<\/a>. As the Javadoc states, this is used by an Intent to \u201cverify the proper installation and availability of the resource files on the system\u201d. In case the resourses are not available, another action named <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.Engine.html#ACTION_INSTALL_TTS_DATA\">ACTION_INSTALL_TTS_DATA<\/a> is used in order to trigger their installation. Note that the SDK&#8217;s emulator supports TTS with no configuration needed. Before using the TTS engine, we have to be sure that it has properly been initialized. In order to get informed on whether this has happened, we can implement an interface called <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.OnInitListener.html\">OnInitListener<\/a>. The method <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.OnInitListener.html#onInit%28int%29\">onInit<\/a> will be invoked when the engine initialization has completed with the accompanying status. After initialization, we can use the <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.html\">TextToSpeech<\/a> class to make the device speak. The relevant method is named <a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.html#speak%28java.lang.String,%20int,%20java.util.HashMap%3Cjava.lang.String,%20java.lang.String%3E%29\">speak<\/a>, where the text, the queue mode and some additional parameters can be passed. It is important to describe queue mode. It is the queuing strategy to be used by the TTS engine, i.e. what to do when a new text has been queued to the engine. There are two options:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.html#QUEUE_ADD\">QUEUE_ADD<\/a>: the new entry is added at the end of the playback queue<\/li>\n<li><a href=\"http:\/\/developer.android.com\/reference\/android\/speech\/tts\/TextToSpeech.html#QUEUE_FLUSH\">QUEUE_FLUSH<\/a>: all entries in the playback queue (media to be played and text to be synthesized) are dropped and replaced by the new entry<\/li>\n<\/ul>\n<p>All the above are translated to the code provided below:<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.android.tts;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.speech.tts.TextToSpeech;\nimport android.speech.tts.TextToSpeech.OnInitListener;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.Toast;\n\npublic class TtsActivity extends Activity implements OnInitListener {\n    \n    private int MY_DATA_CHECK_CODE = 0;\n    \n    private TextToSpeech tts;\n    \n    private EditText inputText;\n    private Button speakButton;\n    \n @Override\n public void onCreate(Bundle savedInstanceState) {\n    \n  super.onCreate(savedInstanceState);\n  setContentView(R.layout.main);\n  \n  inputText = (EditText) findViewById(R.id.input_text);\n  speakButton = (Button) findViewById(R.id.speak_button);\n  \n  speakButton.setOnClickListener(new OnClickListener() {            \n   @Override\n   public void onClick(View v) {\n       String text = inputText.getText().toString();\n       if (text!=null &amp;&amp; text.length()&gt;0) {\n    Toast.makeText(TtsActivity.this, \"Saying: \" + text, Toast.LENGTH_LONG).show();\n    tts.speak(text, TextToSpeech.QUEUE_ADD, null);\n       }\n   }\n      });\n  \n  Intent checkIntent = new Intent();\n      checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);\n      startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);\n        \n    }\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        if (requestCode == MY_DATA_CHECK_CODE) {\n            if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {\n                \/\/ success, create the TTS instance\n                tts = new TextToSpeech(this, this);\n            } \n            else {\n                \/\/ missing data, install it\n                Intent installIntent = new Intent();\n                installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);\n                startActivity(installIntent);\n            }\n        }\n\n    }\n\n    @Override\n    public void onInit(int status) {        \n        if (status == TextToSpeech.SUCCESS) {\n            Toast.makeText(TtsActivity.this, \n                    \"Text-To-Speech engine is initialized\", Toast.LENGTH_LONG).show();\n        }\n        else if (status == TextToSpeech.ERROR) {\n            Toast.makeText(TtsActivity.this, \n                    \"Error occurred while initializing Text-To-Speech engine\", Toast.LENGTH_LONG).show();\n        }\n    }\n    \n}\n<\/pre>\n<p>The engine support is checked in the <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onActivityResult%28int,%20int,%20android.content.Intent%29\">onActivityResult<\/a> method. If there is support for TTS, we initialize the engine, else a new <a href=\"http:\/\/developer.android.com\/reference\/android\/content\/Intent.html\">Intent<\/a> is launched in order to trigger the relevant installation. After initialization, we used a <a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/Toast.html\">Toast<\/a> in order to notify the user about the operation status. Finally, we use a text field where the text is provided by the user and a button which feeds the engine with the provided text. In order to run the project, an appropriate emulator device is needed. If you have none available, use the following configuration in the AVD manager (note that \u201cAndroid 1.6 \u2013 API Level 4\u201d or higher is needed): <a href=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TJu3QCGJwbI\/AAAAAAAAAJI\/IUvFKNL84Aw\/s1600\/02-device.png\"><img decoding=\"async\" style=\"cursor: pointer; height: 320px; margin: 0px auto 10px; text-align: center; width: 230px;\" src=\"http:\/\/3.bp.blogspot.com\/_piNjpdpJZXA\/TJu3QCGJwbI\/AAAAAAAAAJI\/IUvFKNL84Aw\/s320\/02-device.png\" alt=\"\" border=\"0\"><\/a> Provide the text you wish to hear into the text field, hit the button and listen to emulator speak to you! <a href=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TJu3XVY1ARI\/AAAAAAAAAJQ\/1MBo4OHW11c\/s1600\/03-emulator-speak.png\"><img decoding=\"async\" style=\"cursor: pointer; height: 320px; margin: 0px auto 10px; text-align: center; width: 218px;\" src=\"http:\/\/4.bp.blogspot.com\/_piNjpdpJZXA\/TJu3XVY1ARI\/AAAAAAAAAJQ\/1MBo4OHW11c\/s320\/03-emulator-speak.png\" alt=\"\" border=\"0\"><\/a> That&#8217;s all folks, nice and simple. Now, make your devices speak! You can download the created Eclipse project <a href=\"http:\/\/dl.dropbox.com\/u\/7215751\/JavaCodeGeeks\/AndroidTextToSpeechTutorial\/AndroidTextToSpeechProject.zip\">here<\/a>.<\/p>\n<div style=\"margin: 0px;\"><strong><i>Related Articles :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/10\/android-full-application-tutorial.html\">\u201cAndroid Full Application Tutorial\u201d series<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/09\/android-reverse-geocoding-yahoo-api.html\">Android Reverse Geocoding with Yahoo API &#8211; PlaceFinder<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/09\/android-location-based-services.html\">Android Location Based Services Application \u2013 GPS location<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/embracing-android-awesomeness-quick.html\">Install Android OS on your PC with VirtualBox<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2010\/06\/embracing-android-awesomeness-quick.html\">Embracing the Android awesomeness: A quick overview<\/a><\/li>\n<\/ul>\n<div style=\"margin: 0px;\"><strong><i>Related Examples :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/relativelayout\/android-relativelayout-example\/\">Android RelativeLayout Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/imagebutton\/android-imagebutton-example\/\">Android ImageButton Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/imageview\/android-imageview-example\/\">Android ImageView Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/datepicker\/android-date-picker-example\/\">Android Date Picker Example<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly the capability of the device to \u201cspeak\u201d text of different languages. This feature was introduced in version 1.6 of the Android platform and you can find an &hellip;<\/p>\n","protected":false},"author":3,"featured_media":46,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[83,82],"class_list":["post-307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android-core","tag-android-tutorial","tag-text-to-speech"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Text-To-Speech Application - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Text-To-Speech Application - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2010-09-23T23:33:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-02T14:38:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ilias Tsagklis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ilias Tsagklis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html\"},\"author\":{\"name\":\"Ilias Tsagklis\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\"},\"headline\":\"Android Text-To-Speech Application\",\"datePublished\":\"2010-09-23T23:33:00+00:00\",\"dateModified\":\"2019-12-02T14:38:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html\"},\"wordCount\":597,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"keywords\":[\"Android Tutorial\",\"Text To Speech\"],\"articleSection\":[\"Android Core\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html\",\"name\":\"Android Text-To-Speech Application - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"datePublished\":\"2010-09-23T23:33:00+00:00\",\"dateModified\":\"2019-12-02T14:38:54+00:00\",\"description\":\"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/android-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2010\\\/09\\\/android-text-to-speech-application.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/android\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Android Core\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/android\\\/android-core\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Android Text-To-Speech Application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\",\"name\":\"Ilias Tsagklis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"caption\":\"Ilias Tsagklis\"},\"description\":\"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"http:\\\/\\\/www.iliastsagklis.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/iliastsagklis\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ilias-tsagklis\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Text-To-Speech Application - Java Code Geeks","description":"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html","og_locale":"en_US","og_type":"article","og_title":"Android Text-To-Speech Application - Java Code Geeks","og_description":"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly","og_url":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2010-09-23T23:33:00+00:00","article_modified_time":"2019-12-02T14:38:54+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","type":"image\/jpeg"}],"author":"Ilias Tsagklis","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ilias Tsagklis","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html"},"author":{"name":"Ilias Tsagklis","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e"},"headline":"Android Text-To-Speech Application","datePublished":"2010-09-23T23:33:00+00:00","dateModified":"2019-12-02T14:38:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html"},"wordCount":597,"commentCount":17,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","keywords":["Android Tutorial","Text To Speech"],"articleSection":["Android Core"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html","url":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html","name":"Android Text-To-Speech Application - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","datePublished":"2010-09-23T23:33:00+00:00","dateModified":"2019-12-02T14:38:54+00:00","description":"One of the many features that Android provides out of the box is the one of \u201cspeech synthesis\u201d. This is also known as \u201cText-To-Speech\u201d (TTS) and is mainly","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/android-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2010\/09\/android-text-to-speech-application.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Android","item":"https:\/\/www.javacodegeeks.com\/category\/android"},{"@type":"ListItem","position":3,"name":"Android Core","item":"https:\/\/www.javacodegeeks.com\/category\/android\/android-core"},{"@type":"ListItem","position":4,"name":"Android Text-To-Speech Application"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e","name":"Ilias Tsagklis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","caption":"Ilias Tsagklis"},"description":"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.","sameAs":["http:\/\/www.iliastsagklis.com\/","https:\/\/www.linkedin.com\/in\/iliastsagklis"],"url":"https:\/\/www.javacodegeeks.com\/author\/ilias-tsagklis"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/46"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}