ing Emic 2 Module
xanadu
Posts: 3,347
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.
[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 == ":" {{ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TERMS OF USE: MIT License │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation │ │files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, │ │modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│ │is furnished to do so, subject to the following conditions: │ │ │ │The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│ │ │ │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE │ │WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR │ │COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ }}
Comments
Now we have Robot comics!! It's a brave new world!!!!
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.
Great job, Joe!
Ken Gracey
Well done xanadu!
The Goodyear blimps had loudspeakers way back in 1940: http://www.goodyearblimp.com/cfmx/web/blimp/basics/sign.cfm
-Phil
"Who wants a haircut"
"You like your Propeller better than me don't you Dave"
http://www.youtube.com/watch?v=nHJkAYdT7qo
Forgot that in my original post thanks!
I need to get one of these on order. Amazing work Joe!
OBC