Shop OBEX P1 Docs P2 Docs Learn Events
ing Emic 2 Module — Parallax Forums

ing Emic 2 Module

xanaduxanadu Posts: 3,347
edited 2012-07-06 22:00 in General Discussion
For fun...

[video=youtube_share;XwKmddSRlsQ]

Sure this was not the best way to go about doing this, but here is the code. I removed a lot of comments in it so be sure to check out the full example code. Another thing to note is I'm running it 20 wpm over regular speed, some clarity is lost for speed.
{{

*Original Header*
┌─────────────────────────────────────────────────────────┐
│ Emic 2 Text-to-Speech Module: Basic Demonstration       │
│                                                         │
│ Author: Joe Grand [www.grandideastudio.com]             │
│ Contact: support@parallax.com                           │ 
│                                                         │
│ See end of file for terms of use.                       │                      
└─────────────────────────────────────────────────────────┘

Program Description:

This program demonstrates the Emic 2 Text-to-Speech Module.
Debug messages are displayed in the Parallax Serial Terminal.
Please refer to the Emic 2 product manual for full details
of functionality and capabilities.


Emic 2 Connections (4 pin male header)
────────────────────────────────────────────────

SIN     ────── P6
SOUT    ────── P7
VCC     ────── +5V (VDD)
GND     ──────┐
               
              GND (VSS)


Revisions:

1.0 (February 14, 2012): Initial release

*CURRENTLY* Modified from original version, use at your own risk! 
 
}}
CON
  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000
 
OBJ
  pst       : "Parallax Serial Terminal"                   ' Debug Terminal
  serial    : "FullDuplexSerial"                           ' Full Duplex Serial
  
PUB main

  serial.Start(7, 6, 00, 9_600)                      ' Start serial port, normal mode, 9600bps
  serial.TX(pst#NL)                                     ' Send a CR in case the system is already up
  repeat until serial.RxCheck == ":"                    ' When the Emic 2 has initialized and is ready, it will send a single ':' character, so wait here until we receive it
  
  waitcnt(clkfreq / 100 + cnt)                          ' Delay 10mS
  serial.RxFlush                                        ' Flush the receive buffer
  
  serial.Str(String("N0", pst#NL))                      'voice
  repeat until serial.RxCheck == ":"
  
  serial.Str(String("V12", pst#NL))                     'volume 18 max
  repeat until serial.RxCheck == ":"
  
  serial.Str(String("W220", pst#NL))                    'words per minute
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("Hello jerk face, thanks for hooking me up!"))           
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"
 
  serial.TX("S")
  serial.Str(string("Great i can talk! Now about those sensors?"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/__You took my ping sensor off and never put it back? __You used the ping servo on god knows __what"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/__You never installed the three axis accelerometer! And I still don't feel any rote ary encoders on my wheels"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("/\Let me go off topic for a second, do you know what it's like to move and not know how far you went?"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("i didn't think so! look at you with all these parts and zero time for __me!"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("/\how about some more LEDs or maybe some infrared object detection and GPS"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("i know you have all this stuff laying around, you can't even install the lithium polymer battery"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("/\how about a magnetic compass? or pressure altimeter, __you must like dumb robots!"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("/\/\i could be telling you the tempature and humidity right now but those parts are covered in dust somewhere"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("/\what is going on with my docking station? you said i'd have a docking station, but it looks like you sold out to another robot"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("i think my battery is getting low. Let's see when did you recharge me last? six months ago? a year ago?"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/L O L "))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/\/\/\/i bet you're glad you hooked me up, aren't you?"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/\/\/\/\/\/<<i seem to be feeling kind of slow now"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string("\/\/\/\/\/\/\/\/<<<<<<i'm going to take a nap now, wake me up when i'm finished"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"

  serial.TX("S")
  serial.Str(string(">>jerk face!"))
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"  


{{
&#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
&#9474;                                                   TERMS OF USE: MIT License                                                  &#9474;                                                            
&#9500;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9508;
&#9474;Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation    &#9474; 
&#9474;files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,    &#9474;
&#9474;modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software&#9474;
&#9474;is furnished to do so, subject to the following conditions:                                                                   &#9474;
&#9474;                                                                                                                              &#9474;
&#9474;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&#9474;
&#9474;                                                                                                                              &#9474;
&#9474;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE          &#9474;
&#9474;WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR         &#9474;
&#9474;COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,   &#9474;
&#9474;ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                         &#9474;
&#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;
}}

  

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2012-07-06 12:13
    I'm in tears!!! This is hilarious and based on your success, I'm cancelling my EMIC 2 order because I really DON'T need this kind of aggravation!!!

    Now we have Robot comics!! It's a brave new world!!!!
  • xanaduxanadu Posts: 3,347
    edited 2012-07-06 12:37
    Thanks Rick I'm glad you liked it. No technology makes me smile as much as robotics.

    This thing is a breeze compared to Speakjet. Speakjet has a unique sound and sound effects, however the Emic 2's voice is very easy to understand, just like computer based TTS. Perfect Paul is the man lol.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-07-06 15:23
    Got mine today........(hiding in basement)
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2012-07-06 15:38
    Wow. This is the first I've actually heard the Emic2 - can't wait to get to Parallax on Monday to check one out.

    Great job, Joe!

    Ken Gracey
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-07-06 15:58
    All right, all right - I give in!!! I just ordered one - they are too much fun to ignore!
  • W9GFOW9GFO Posts: 4,010
    edited 2012-07-06 20:15
    Oh I've got to get me one of those!

    Well done xanadu!
  • ercoerco Posts: 20,259
    edited 2012-07-06 20:27
    Rich: You can be the first "voice in the sky" talking quadrotor!

    The Goodyear blimps had loudspeakers way back in 1940: http://www.goodyearblimp.com/cfmx/web/blimp/basics/sign.cfm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-06 20:55
    That video cracks me up! But what an impressive demo of a very neat new product! 'Hats off to Joe Grand and Parallax. The bar has been raised very high, indeed!

    -Phil
  • jdoleckijdolecki Posts: 726
    edited 2012-07-06 21:08
    yea the Quadrotor could fly over people and ask

    "Who wants a haircut"
  • jdoleckijdolecki Posts: 726
    edited 2012-07-06 21:23
    Or this old mac ad would be intresting

    "You like your Propeller better than me don't you Dave"

    http://www.youtube.com/watch?v=nHJkAYdT7qo
  • xanaduxanadu Posts: 3,347
    edited 2012-07-06 21:50
    'Hats off to Joe Grand and Parallax. The bar has been raised very high, indeed!

    -Phil

    Forgot that in my original post thanks!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-07-06 22:00
    Perhaps Professor Hawking will make a short guest appearance on The Prototypers.

    I need to get one of these on order. Amazing work Joe!

    OBC
Sign In or Register to comment.