O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Android voice skill sprint

10.716 visualizações

Publicada em

Adding voice launch, speech recognition and text to speech to Android and Google Glass. See also http://delphi.org/2014/07/android-voice/

Publicada em: Tecnologia, Negócios
  • Seja o primeiro a comentar

Android voice skill sprint

  1. 1. EMBARCADERO  TECHNOLOGIES  EMBARCADERO  TECHNOLOGIES   Add  Voice  to  All   Your  Android  Apps   Jim  McKeeth   Lead  World  Wide  Developer  Evangelist  &  Engineer   jim.mckeeth@embarcadero.com   @JimMcKeeth   10th  of  July,  2014   Download  a  free  trial  –  NOW!   hLp://embt.co/trialdownloads    
  2. 2. EMBARCADERO  TECHNOLOGIES   Agenda   •  Voice  Launching  Google  Glass  Apps   –  Standard  Triggers   –  Unlisted  Triggers   •  AddiUonal  Prompts  on  Google  Glass   •  Voice  RecogniUon  on  Android   •  Text-­‐To-­‐Speech  on  Android  
  3. 3. EMBARCADERO  TECHNOLOGIES   Voice  Launching  Google  Glass  Apps   •  Add  a  Voice  Trigger  XML  file:   –  Choose  a  Standard  Voice  command  hLp://embt.co/glass-­‐voice-­‐triggers     –  Deploy  to  resxml  folder.   •  Modify  the  Android  Manifest  Template:   –  Add  an  Intent  Filter   •  <action  android:name="com.google.android.glass.action.VOICE_TRIGGER"/>   –  Add  Meta  Data  for  Filter   •  <meta-­‐data  android:name="com.google.android.glass.VoiceTrigger”                android:resource="@xml/my_voice_trigger"  />  
  4. 4. EMBARCADERO  TECHNOLOGIES   Custom  Glass  Voice  Trigger   •  Change  XML  to  from  Command  to  Keyword.   •  Use  arbitrary  text  for  voice  trigger.   •  Use  the  Development  permission:   –  <uses-­‐permission    android:name="com.google.android.glass.permission.DEVELOPMENT"/>   –  Added  to  android  manifest  template   •  Not  allowed  for  distribuUon   –  Usable  for  in-­‐house  use  
  5. 5. EMBARCADERO  TECHNOLOGIES   AddiConal  Prompts  on  Google  Glass   •  Collect  addiUonal  Voice  recogniUon  input  when  app  is   launched.   –  Add  an  Input  Prompt  to  the  Voice  Trigger  XML   <?xml  version="1.0"  encoding="UTF-­‐8"?>   <trigger  command="TAKE_A_NOTE">          <input  prompt="What  shall  I  say?"  />   </trigger>   •  In  FormCreate  get  speech  guesses  from  Intent  Extras   –  SharedActivity.getIntent.getExtras.   getStringArrayList(TJRecognizerIntent.JavaClass.EXTRA_RESULTS);  
  6. 6. EMBARCADERO  TECHNOLOGIES   Voice  RecogniCon  on  Android   •  Prompts  user  for  voice  input   •  Returns  up  to  5  “guesses”   •  Works  offline  too     –  (only  returns  1  guess)   •  Reusable  component  for   download.  
  7. 7. EMBARCADERO  TECHNOLOGIES   Text-­‐To-­‐Speech  on  Android   •  Converts  Text  to  spoken   word.   •  Reusable  component  based   on  Jeff  Overcash’s   translaUon.   •  Example  of  handling  Java   Listener  events.  
  8. 8. EMBARCADERO  TECHNOLOGIES   DEMONSTRATION   Add  Voice  to  All  Your  Android  Apps  
  9. 9. EMBARCADERO  TECHNOLOGIES   Android  Voice  Summary   •  Using  Voice  to  Launch  on  Google  Glass   •  Google  Glass  Prompts  for  Voice  Input   •  Voice  RecogniUon  on  Android   •  Text-­‐To-­‐Speech  on  Android  
  10. 10. EMBARCADERO  TECHNOLOGIES   Android  JNI  Resources   •  Samples   –  C:UsersPublicDocumentsEmbarcaderoStudio14.0SamplesObject  PascalMobile  SamplesGoogle  Glass   •  DocWiki   –  hLp://docwiki.embarcadero.com/CodeExamples/XE6/en/FMX.Mobile.GoogleGlass_Sample_(Delphi)   •  Glass  Launch  Commands   –  hLp://embt.co/glass-­‐voice-­‐triggers     •  Blog  Post   –  Slides  &  New  Samples   –  hLp://delphi.org/2014/07/android-­‐voice/  (Later  today)   Download  a  free  trial  –  NOW!   hNp://embt.co/trialdownloads    
  11. 11. EMBARCADERO  TECHNOLOGIES   Next  Time….   •  Use  the  Database  Explorer  with  FireDAC   –  Make  your  database  applicaUon  development  even  more   producUve  with  help  form  the  Database  Explorer  and  FireDAC.   •  Tuesday  the  15th  of  July   –  6AM  San  Francisco  /  9AM  New  York  /  2PM  London  /  3PM  Milan   –  11AM  San  Francisco  /  2PM  New  York  /  7PM  London  /  8PM  Milan   –  5PM  San  Francisco  /  Wed  9AM  Tokyo  /  Wed  10AM  Sydney   Download  your  free  trial  now!  -­‐  hLp://embt.co/trialdownloads    
  12. 12. EMBARCADERO  TECHNOLOGIES  EMBARCADERO  TECHNOLOGIES   Q  &  A     Download  your  free  trial  now!     hLp://embt.co/trialdownloads     @EmbarcaderoTech