Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OK, Computer

OK, Computer

On talking to computers. Presented at London Web, March 2015. Lots of live demos, so will make more sense if you watch a video of the talk.

Peter Gasston

March 19, 2015
Tweet

More Decks by Peter Gasston

Other Decks in Technology

Transcript

  1. Chrome/Safari v a r t x t = ' H

    e l l o w o r l d ' , s a y = n e w S p e e c h S y n t h e s i s U t t e r a n c e ( t x t ) ; w i n d o w . s p e e c h S y n t h e s i s . s p e a k ( s a y ) ; The Web Speech A.P.I. Play
  2. SSU Attributes v a r t x t = '

    H e l l o w o r l d ' , s a y = n e w S p e e c h S y n t h e s i s U t t e r a n c e ( t x t ) ; s a y . l a n g = ' e n - G B ' ; s a y . p i t c h = 0 . 7 5 ; s a y . r a t e = 1 . 5 ; s a y . v o l u m e = 0 . 5 ; w i n d o w . s p e e c h S y n t h e s i s . s p e a k ( s a y ) ; The Web Speech A.P.I. Play
  3. Synthesis As A Service 1. 2. 3. 4. developer.att.com/apis/speech ws.neospeech.com/

    cereproc.com/en/products/cloud ivona.com/en/for-business/speech-cloud/
  4. SSML < s p e a k v e r

    s i o n = " 1 . 0 " > < p > < s > T h i s i s < a b b r > S . S . M . L . < / a b b r > < / s > < s > S p e a k < p r o s o d y r a t e = " - 2 0 % " > s l o w l y < / p r o s o d y > . < / s > < / p > < / s p e a k >
  5. Web Speech API v a r r e c o

    g = n e w S p e e c h R e c o g n i t i o n ( ) ; x-browser v a r s p e e c h R e c o g n i t i o n = ( w i n d o w . S p e e c h R e c o g n i t i o n | | w i n d o w . w e b k i t S p e e c h R e c o g n i t i o n ) ; v a r r e c o g = n e w s p e e c h R e c o g n i t i o n ( ) ;
  6. SpeechRecognition Methods v a r r e c o g

    = n e w S p e e c h R e c o g n i t i o n ( ) ; r e c o g . s t a r t ( ) ; r e c o g . s t o p ( ) ; r e c o g . a b o r t ( ) ;
  7. SpeechRecognition Events v a r r e c o g

    = n e w S p e e c h R e c o g n i t i o n ( ) ; r e c o g . o n r e s u l t = f u n c t i o n ( ) { } ; r e c o g . o n n o m a t c h = f u n c t i o n ( ) { } ; r e c o g . o n e r r o r = f u n c t i o n ( ) { } ;
  8. MVS v a r r e c o g =

    n e w S p e e c h R e c o g n i t i o n ( ) ; r e c o g . o n r e s u l t = f u n c t i o n ( r e s u l t ) { o u t p u t . t e x t C o n t e n t = r e s u l t s [ 0 ] [ 0 ] . t r a n s c r i p t ; } ; b t n . o n c l i c k = r e c o g . s t a r t ( ) ; Click header for demo
  9. Interim Results v a r r e c o g

    = n e w S p e e c h R e c o g n i t i o n ( ) ; r e c o g . i n t e r i m R e s u l t s = t r u e ; r e c o g . o n r e s u l t = f u n c t i o n ( r e s u l t ) { i f ( r e s u l t . r e s u l t s [ 0 ] . i s F i n a l ) { … } } ; b t n . o n c l i c k = r e c o g . s t a r t ( ) ; Click header for demo
  10. Continuous v a r r e c o g =

    n e w S p e e c h R e c o g n i t i o n ( ) ; r e c o g . c o n t i n u o u s = t r u e ; r e c o g . o n r e s u l t = f u n c t i o n ( r e s u l t ) { o u t p u t . t e x t C o n t e n t = r e s u l t . r e s u l t s [ 0 ] [ 0 ] . t r a n s c r i p t ; } ; b t n . o n c l i c k = f u n c t i o n ( ) { i f ( l i s t e n i n g ) { r e c o g . s t o p ( ) ; } e l s e { r e c o g . s t a r t ( ) ; } }
  11. JuliusJS v a r r e c o g =

    n e w J u l i u s ( ) ; r e c o g . o n r e c o g n i t i o n = f u n c t i o n ( r e s u l t ) { c o n s o l e . l o g ( r e s u l t ) ; }
  12. Wit + Node 1. Web Speech API + text 2.

    Direct speech: GuM, Web Audio API
  13. Copyright Note The video clips in this presentation from the

    films Moon, Star Trek: The Voyage Home, Her, Star Trek, and 2001: A Space Odyssey belong to their respective copyright holders and are used here without permission.