{"id":224685,"date":"2014-05-30T15:10:02","date_gmt":"2014-05-30T11:10:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=224685"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=224685","title":{"rendered":"<span class=\"post_title\">\u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440 \u0440\u0435\u0447\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u041c\u0435\u043d\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0433\u043e\u0440\u0447\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 Android \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u0430 \u0440\u0435\u0447\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u0431\u044b\u043b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c, \u0438\u0441\u043f\u0430\u043d\u0441\u043a\u0438\u043c, \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u043c, \u043d\u0435\u043c\u0435\u0446\u043a\u0438\u043c \u0438 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u0438\u043c. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0432\u0438\u0434\u0438\u043c\u043e \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u00ab\u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0440\u0430\u00bb.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0447\u0435\u0440\u0430, \u0432\u043a\u043b\u044e\u0447\u0438\u0432 WiFi \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0432 \u043c\u0435\u0442\u0440\u043e, \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440 \u0440\u0435\u0447\u0438 Google \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0434\u0440\u0443\u0433 \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0430 \u043d\u0435 \u043c\u043e\u0433\u0443 \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0432 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438?<br \/>  \u041d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0444\u0440\u0430\u0437\u0443 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0438: \u00ab\u0410 \u0412\u0430\u0441\u044c\u043a\u0430 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0434\u0430 \u0435\u0441\u0442\u00bb.<\/p>\n<pre><code class=\"java\">\/\/ \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u041a\u043b\u0438\u043c\u043e\u0432, \/\/ \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u044e, \u043a\u0442\u043e \u0435\u0433\u043e \u043f\u0438\u0441\u0430\u043b.  package ru.alexanderklimov.tts;  import java.util.Locale;  import android.app.Activity; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView;  public class MainActivity extends Activity implements \t\tTextToSpeech.OnInitListener {  \tprivate Button mButton; \tprivate TextToSpeech mTTS;  \t@Override \tprotected void onCreate(Bundle savedInstanceState) { \t\tsuper.onCreate(savedInstanceState); \t\tsetContentView(R.layout.activity_main); \t\t \t\tmTTS = new TextToSpeech(this, this);  \t\tmButton = (Button) findViewById(R.id.button1); \t\t \t\tmButton.setOnClickListener(new OnClickListener() { \t\t\t \t\t\t@Override \t\t\tpublic void onClick(View v) { \t\t\t\tString text = &quot;\u0410 \u0412\u0430\u0441\u044c\u043a\u0430 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0434\u0430 \u0435\u0441\u0442&quot;; \t\t                mTTS.speak(text, TextToSpeech.QUEUE_FLUSH, null); \t\t\t} \t\t}); \t}  \t@Override \tpublic void onInit(int status) { \t\t\/\/ TODO Auto-generated method stub \t\tif (status == TextToSpeech.SUCCESS) { \t\t\t \t\t\tLocale locale = new Locale(&quot;ru&quot;);  \t\t\tint result = mTTS.setLanguage(locale); \t\t\t\/\/int result = mTTS.setLanguage(Locale.getDefault());  \t\t\tif (result == TextToSpeech.LANG_MISSING_DATA \t\t\t\t\t|| result == TextToSpeech.LANG_NOT_SUPPORTED) { \t\t\t\tLog.e(&quot;TTS&quot;, &quot;\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f&quot;); \t\t\t} else { \t\t\t\tmButton.setEnabled(true); \t\t\t}  \t\t} else { \t\t\tLog.e(&quot;TTS&quot;, &quot;\u041e\u0448\u0438\u0431\u043a\u0430!&quot;); \t\t}  \t} \t  \t@Override \tpublic void onDestroy() { \t\t\/\/ Don't forget to shutdown mTTS! \t\tif (mTTS != null) { \t\t\tmTTS.stop(); \t\t\tmTTS.shutdown(); \t\t} \t\tsuper.onDestroy(); \t} } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u043b\u044b\u0448\u0430\u043b \u0440\u043e\u0434\u043d\u0443\u044e \u0440\u0435\u0447\u044c, \u043f\u0440\u043e\u0438\u0437\u043d\u0435\u0441\u0451\u043d\u043d\u0443\u044e \u0436\u0435\u043d\u0441\u043a\u0438\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u043c.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043b\u043e\u043a\u0430\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Locale.getDefault(). \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0434\u0440\u0443\u0433\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c Locale(\u00abru\u00bb). \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0442\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435.<br \/>  \u0415\u0441\u043b\u0438 \u043a \u0432\u0430\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u0430 \u0440\u0435\u0447\u0438 Google \u0435\u0449\u0451 \u043d\u0435 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 Google Play \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.tts\">https:\/\/play.google.com\/store\/apps\/details?id=com.google.android.tts<\/a>.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/224685\/\"> http:\/\/habrahabr.ru\/post\/224685\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u041c\u0435\u043d\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0433\u043e\u0440\u0447\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 Android \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u0430 \u0440\u0435\u0447\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u0431\u044b\u043b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c, \u0438\u0441\u043f\u0430\u043d\u0441\u043a\u0438\u043c, \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u043c, \u043d\u0435\u043c\u0435\u0446\u043a\u0438\u043c \u0438 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u0438\u043c. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0432\u0438\u0434\u0438\u043c\u043e \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u00ab\u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0440\u0430\u00bb.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-224685","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=224685"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224685\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=224685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=224685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=224685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}