|
Página 1 de 1
|
[ 5 Mensagens ] |
|
Som com Reconhecimento de voz do Google.
| Autor |
Mensagem |
|
alanfortlink
Anatomy of an App
Data de registro: 05 Dez 2011, 21:04 Mensagens: 101
|
 Som com Reconhecimento de voz do Google.
Pessoal, estou precisando fazer o seguinte:
String a = "Portal Android";
Preciso falar essa variável a.
Literalmente, preciso que o celular ou tablet fale isso para o usuário.
|
| 30 Set 2012, 11:08 |
|
 |
|
Androman
Application framework
Data de registro: 02 Jan 2010, 15:18 Mensagens: 487
|
 Re: Som com Reconhecimento de voz do Google.
alanfortlink escreveu: Pessoal, estou precisando fazer o seguinte:
String a = "Portal Android";
Preciso falar essa variável a.
Literalmente, preciso que o celular ou tablet fale isso para o usuário. Olá!!! Não entendi muito bem a sua dúvida... Mas se for algo que vc fale e o seu smartphone responda, eu já postei a solução em um outro tópico. Sendo assim, por favor, pesquise no fórum que vc encontrará a solução ok! Abraços. Androman.
_________________LG NEXUS 4 - Jelly Bean 4.2.2HTC Desire HD - Gingerbread 2.3.5Galaxy Tab 10.1 - Ice Cream Sandwich 4.0.4Motorola Milestone 1 - MIUIBR 2.3 **Touch Death** Siga-me no Twitter
|
| 30 Set 2012, 17:41 |
|
 |
|
alanfortlink
Anatomy of an App
Data de registro: 05 Dez 2011, 21:04 Mensagens: 101
|
 Re: Som com Reconhecimento de voz do Google.
Não consegui achar, tá em que categoria?
|
| 30 Set 2012, 17:48 |
|
 |
|
victorapc
Widgets
Data de registro: 13 Abr 2011, 17:37 Mensagens: 309
|
 Re: Som com Reconhecimento de voz do Google.
Tenta isso... package com. androidhive. texttospeech; 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. widget. Button; import android. widget. EditText; public class AndroidTextToSpeechActivity extends Activity implements TextToSpeech. OnInitListener { /** Called when the activity is first created. */ private TextToSpeech tts; private Button btnSpeak; private EditText txtText; @Override public void onCreate (Bundle savedInstanceState ) { super. onCreate(savedInstanceState ); setContentView (R. layout. main); tts = new TextToSpeech (this, this); btnSpeak = (Button) findViewById (R. id. btnSpeak); txtText = (EditText ) findViewById (R. id. txtText); // button on click event btnSpeak. setOnClickListener(new View. OnClickListener() { @Override public void onClick (View arg0 ) { speakOut (); } }); } @Override public void onDestroy () { // Don't forget to shutdown tts! if (tts != null) { tts. stop(); tts. shutdown(); } super. onDestroy(); } @Override public void onInit (int status ) { if (status == TextToSpeech. SUCCESS) { int result = tts. setLanguage(Locale. US); if (result == TextToSpeech. LANG_MISSING_DATA || result == TextToSpeech. LANG_NOT_SUPPORTED) { Log. e("TTS", "This Language is not supported"); } else { btnSpeak. setEnabled(true); speakOut (); } } else { Log. e("TTS", "Initilization Failed!"); } } private void speakOut () { String text = txtText. getText(). toString(); tts. speak(text, TextToSpeech. QUEUE_FLUSH, null); }} Se quiser trocar de lingua. tts. setLanguage(Locale. CHINESE); // Chinese languageVê se te ajuda.
|
| 01 Out 2012, 10:12 |
|
 |
|
Androman
Application framework
Data de registro: 02 Jan 2010, 15:18 Mensagens: 487
|
 Re: Som com Reconhecimento de voz do Google.
alanfortlink escreveu: Não consegui achar, tá em que categoria? Segue o tópico. Abraços. Androman.
_________________LG NEXUS 4 - Jelly Bean 4.2.2HTC Desire HD - Gingerbread 2.3.5Galaxy Tab 10.1 - Ice Cream Sandwich 4.0.4Motorola Milestone 1 - MIUIBR 2.3 **Touch Death** Siga-me no Twitter
|
| 01 Out 2012, 21:39 |
|
|
|
Página 1 de 1
|
[ 5 Mensagens ] |
|
Quem está online |
Usuários vendo este fórum: alberto, Alex Marcelo Burnett, alexandreufcg, alexcost2002, amos, anaguerra, Andreid, andreleitao, Antonio Carlos, AT-AT, bbourbon, bernardodauer, BOMBER27, Bravox, brenda, cabelo, camilodev, celiapinheiro, cesao, cezaraf, Chewbacca, CKorneLL, cleberkct, cleiton_maciel, Clone Trooper, Danilo Dias, danilosouza, Darth Maul, Dassi, dbispo, dchechetto, debal, Diego Otani, dirceuconte, dkclan, DroidBot, eduardo.ali, eloilton, epsilva, felipe.cintra, felipecomp19, fernandodotnet, flaviocc, flaviohssantos, fredjpa, free_w3000, Geire Robson Gadelha, geovanebg, Guilherme Cobain, gusrp, gutodias, Henrique Ferraz, ice, ismaelbpaiva, italoraony, iuri_freire, JackBlackJack, Jalerson, jmarcos14, JMurray, joaquimfoto, juniorsk8, klausenner, leo, Leonardo333, lfirpo, luciocamilo, luizfilipe, Maiquell, Marcelo, marcelocastellani, marcelorferrari, marcow, marinho5, Marini, miguel, mrkensley, Mvitor, nakahara, neimarguerra, Newton Barbosa, Nice, oliveiramc, paulabr, paulovaz, Petto, pgbatera, pgsnit, phfmendes, pilon, pjorge, pmzara, polonia, pumadeejay, Ranieri, raulcca, reginaldo, regisjj, renanpl, renata, ricardzanella, Rickxdx, rmendes, rodrigo aguiar, rotmeil, scattonevi, schiroky, Shinigami, sjta, tavares767, tChAnDy, thiago@xbrain.com.br, thiagotomais, thiaguim, thienne, tiasousa, tnarnold, Toks, ton.soares, tonholis, tonylock, ttaranto, vandob, vaniuz, washington, Wds, Webnet, Wenceslau, weverton, wil, wilson.slima, xGambit, YaCy, zaquiel, zeantonio e 5 visitantes |
|
Você não pode criar novos tópicos neste fórum Você não pode responder tópicos neste fórum Você não pode editar suas mensagens neste fórum Você não pode excluir suas mensagens neste fórum Você não pode enviar anexos neste fórum
|
|