IMP & Parallax Emic2 Text-to-Speech Module
Marcus Kirsch
Posts: 6
Hello Parallax, and its good to be back after quite some many years since I STAMP chipped.
I am having an Electric IMP that I want to talk to a Emic2 module. I had an arduino inbetween, but as there is no complex logic on teh arduino, I am trying to skip it in the setup (save power, etc.).
However, the code doesn't comply yet PLUS, I would like to know how to tell the Emic2 to set up different voices, etc. Arduino or Electric IMP.
So thats two questions, what's wrong with my IMP code (if someone here knows IMPish) and how to tell teh module on volume and voice type, etc.
I am having an Electric IMP that I want to talk to a Emic2 module. I had an arduino inbetween, but as there is no complex logic on teh arduino, I am trying to skip it in the setup (save power, etc.).
However, the code doesn't comply yet PLUS, I would like to know how to tell the Emic2 to set up different voices, etc. Arduino or Electric IMP.
So thats two questions, what's wrong with my IMP code (if someone here knows IMPish) and how to tell teh module on volume and voice type, etc.
// Serial Communication function readSerial() { local serialConn = hardware.uart57; local readBuffer = blob(1); local byte; local byteIndex = 0; local str = ""; while((byte=serialConn.read())!=-1){ readBuffer.writen(byte, 'b'); //Can comment if you don't want to use the blob server.log(format("Byte %d = %d = 0x%2X = %c", byteIndex++, byte, byte, byte)); //Can comment if you don't want individual byte logging str += byte.tochar(); //Converts integer read by UART into ASCII char for string representation } if(str.len() > 0){ //Function may get called by callback when no data is present - no need to log server.log("Read String Representation = " + str) } //server.log("Serial event:"+serialConn.read()); serialConn.write('\n'); // Send a CR in case the system is already up serialConn.flush(); serialConn.write("Message Received"); } // configure a pin pair for UART TX/RX hardware.uart57.configure(9600, 8, PARITY_NONE, 1, NO_CTSRTS, readSerial); imp.configure("Text To Speech", [], [], {}); server.log("DEVICE started");
Comments
Good to hear.
Did you figure out how to change voices? I know it's in the documentation. Let me know if you have trouble finding the information. I just checked, and in version 1.1 of the manual it has the select voice command ("N") on page 5. Volume adjustment ("V") is described on the same page.