#include <ottsemic.h>
Public Member Functions | |
| oTTSemic (IOLINE rx, IOLINE tx) | |
| Constructor for emic Text to Speech Unit. | |
| void | send_command (const char *const icommand, const char *const iparm) |
| transmits an ASCII emic command. | |
| bool | say (const char *const icommand) |
| wrapper for say command. | |
| void | receive_ack (void) |
| will wait for a 'OK' or "ERROR" string from emic module. | |
| bool | error (void) |
| Return whether last command was an error (true). | |
| void | reset (void) |
| Performs a soft reset. | |
The oTTSemic object allows the conversion of text to speech using the Emic #36000 module.
#include <hardware/oled.h> #include <oconsole.h> #include "ottsemic.h" oConsole console; oTTSemic emic(8,9); char RXbuff[251]; char TXbuff[251]; oGreenLED green; oRedLED red; // ----------------------------------------------------------------- // MAIN // ----------------------------------------------------------------- int main() { char c; red.off(); green.on(); console.buffer(&RXbuff[0],250,&TXbuff[0],250); console.syncronize(); emic.reset(); bool done = false; while (!done) { emic.say("Hello. My name is Daisy. What is you're name?"); console.echo("x to exit; anything else to repeat\n"); c = console.get(); if (c == 'x') done = true; } emic.say("goodbye"); console.echo("done"); green.off(); red.on(); for (int i=0; i<190000; i++); exit(0); }
|
||||||||||||
|
Constructor for emic Text to Speech Unit.
|
|
|
wrapper for say command.
|
|
||||||||||||
|
transmits an ASCII emic command.
|
1.3