Shop OBEX P1 Docs P2 Docs Learn Events
Emic2: Modern Man by George Carlton — Parallax Forums

Emic2: Modern Man by George Carlton

Jim the HermitJim the Hermit Posts: 79
edited 2014-04-22 17:58 in Robotics
I made my Emic2 do the late [[George Carlton's Modern Man routine because I thought it would be interesting to hear a robot do it.
I know it could be made better- post improvements if you want.

{{
┌─────────────────────────────────────────────────────────┐
│ Emic 2 Text-to-Speech Module: Modern Man                │
└─────────────────────────────────────────────────────────┘


Program Description:


George Carlton's awesome standup routine.




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


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




Revisions:


1.0 (2014)
 
}}




CON
  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000


  EMIC_TX        = 6             ' Serial output (connects to Emic 2 SIN)
  EMIC_RX        = 7             ' Serial input (connects to Emic 2 SOUT)
 
VAR


    
OBJ
  pst       : "Parallax Serial Terminal"                   ' Debug Terminal
  serial    : "FullDuplexSerial"                           ' Full Duplex Serial
  
PUB main


  serial.Start(EMIC_RX, EMIC_TX, %0000, 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


  serial.Str(String("N4", pst#NL))                      'voice
  repeat until serial.RxCheck == ":"


  serial.Str(String("V16", pst#NL))                      'volume -48 to 18
  repeat until serial.RxCheck == ":"
  
  serial.Str(String("W240", pst#NL))                    'words per minute
  repeat until serial.RxCheck == ":"  


  waitcnt(clkfreq / 100 + cnt)                          ' Delay 10mS


  serial.RxFlush                                        ' Flush the receive buffer
      
  serial.TX("S")
  serial.Str(@ModernMan)                               ' Send the desired string to convert to speech (stored in the DAT section below)
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"                    ' Wait here until the Emic 2 responds with a ":" indicating it's ready to accept the next command
    
  serial.TX("S")
  serial.Str(@ModernMan2)                               
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"
  
  serial.TX("S")
  serial.Str(@ModernMan3)                               
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"


  serial.TX("S")
  serial.Str(@ModernMan4)                               
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"


  serial.TX("S")
  serial.Str(@ModernMan5)                               
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"


  serial.TX("S")
  serial.Str(@ModernMan6)                               
  serial.TX(pst#NL)
  repeat until serial.RxCheck == ":"


 
DAT
 ModernMan    byte    "I'm a __modern man, /\a man for the millennium."
              byte    "Digital and smoke free.\/" 
              byte    ">>A __diversified __multi-cultural __post-modern __deconstructionist, <<politically anatomically and ecologically incorrect." 
              byte    "I've been __uplinked and __downloaded,  I've been __inputted and __outsourced.  I __know the __up side of __down sizing I know the __down side of __upgrading." 
              byte    "I'm a __high-tech __low-life. A cutting edge state of the art bi coastal multi tasker and I can give you a __gigabyte, in a __nano second."
              byte    "/\I'm new wave, \/but I'm old school /\and my inner child is outward bound." 
              byte    ">>I'm a __hot wired __heat seeking __warm hearted __cool customer\/ <<__voice activated and __bio-degradeable." 
              byte    "I interface with my database, my database is in cyber space, so I'm __inter active I'm __hyper active and from time to time I'm __radio __active.",0 


 ModernMan2   byte    ">>__Behind the eight ball __ahead of the curve __riding the wave __dodging the bullet __pushing the envelope.<<"
              byte    "I'm __on point __on task __on message and __off drugs." 
              byte    "I've got no need for coke and speed, I've got no urge to binge and purge."
              byte    "I'm __in the moment __on the edge __over the top but __under the radar. /\A __high-concept __low-profile __medium-range ballistic missionary.\/" 
              byte    "/\A street-wise smart bomb.  \/A __top gun __bottom feeder." 
              byte    "I wear power ties I tell power lies I take power naps I run victory laps." 
              byte    "I'm a totally ongoing __big-foot __slam-dunk __rainmaker with a pro-active out reach." 
              byte    "A __raging __work aholic. A __working __rage aholic." 
              byte    "Out of rehab and /\in, denial\/.",0 


 ModernMan3   byte    "I've got a __personal trainer a __personal shopper a __personal assistant and a __personal agenda."
              byte    "You __can't __shut me up, you __can't __dumb me down.  Because I'm __tireless and I'm __wireless, /\I'm an alpha male on bayta blockers.\/"
              byte    "\/I'm a __non-believer and an __over-achiever.  /\Laid-back but fashion-forward. >>__Up front __down home, __low rent __high maintenance."
              byte    "__Super sized __long lasting __high definition __fast acting __oven ready and __built to last<<"
              byte    "I'm a hands __on __foot loose __knee jerk __head case.  __Prematurely __post traumatic, and I’ve got a __love child who sends me __hate mail." ,0             




 ModernMan4   byte    "<<But I'm __feeling I'm __caring I'm __healing I'm sharing.  >>A supportive __bonding __nurturing primary __care-giver."
              byte    "My output is down, /\but my income is up. \/I took a short position on the long bond and my revenue stream has its __own cash-flow."
              byte    "I read __junk mail I eat __junk food I buy __junk bonds I watch __trash sports."
              byte    "I'm gender specific capital intensive user-friendly and lactose intolerant.",0


 ModernMan5   byte    "I like rough sex. I like tough love. I use the “F” word in my emails and the software on my hard-drive is hard core--no soft porn."
              byte    "I bought a __micro wave at a __mini mall; I bought a __mini van at a __mega-store."
              byte    "I eat fast-food in the slow lane. /\I'm toll free, bite-sized ready-to-wear and\/ I __come in all sizes."
              byte    "A fully equipped factory authorized hospital tested clinically proven scientifically formulated medical miracle."
              byte    ">>I’ve been __pre-wash __pre-cooked __pre-heated __pre-screened __pre-approved __pre-packaged __post-dated __freeze-dried __double-wrapped __vacuum-packed.<<"
              byte    "and, I have an unlimited broad band capacity.",0


 ModernMan6   byte     "I'm a rude dude, but I'm the real deal. <<__Lean and __mean, Cocked locked and ready to rock.>> __Rough, __tough and hard to __bluff."
              byte     "But I take it slow, I go with the flow,  ride with the tide I'’ve got glide in my stride."
              byte     "\/Drivin and movin, sailin and spinin, jiving and groovin, wailin and winnin./\/\ I don't __snooze, \/so I don't __lose."
              byte     "I keep the pedal to the metal and the rubber on the road."
              byte     "/\I party hearty and \/lunch time is crunch time."
              byte     "I'm hangin in, /\there ain’t no doubt\/ << And I'm hangin __tough. \/Over and out.\/ >>",0

Comments

  • Jim the HermitJim the Hermit Posts: 79
    edited 2014-04-20 18:25
    Of course now that I posted it, a piece of code became missing. That never happened in the 100+ times I tested it.

    add this in PUB main
      serial.Str(string("P1", pst#NL))                      'set parser  P0=DecTalk P1=Epson
      repeat until serial.RXCheck == ":"
    
  • rogersydrogersyd Posts: 222
    edited 2014-04-22 17:58
    Good times indeed! Thanks for sharing.

    I made a version for the folks who prefer using the driver...
Sign In or Register to comment.