Shop OBEX P1 Docs P2 Docs Learn Events
Javelin code for E-mic text to speech — Parallax Forums

Javelin code for E-mic text to speech

rkashefrkashef Posts: 2
edited 2006-05-08 14:28 in General Discussion
is there java code for the E-mic module?

Comments

  • rkashefrkashef Posts: 2
    edited 2006-05-07 04:08
    so if i create a new Uart instance i can do this?

    char saycmd[noparse]/noparse = new char[noparse]/noparse{ 's','a','y','=','h','e','l','l','o','#'};

    int index=0;
    while(char[noparse][[/noparse]index]!='#')

    tx.sendByte(char[noparse][[/noparse]index++]);


    i don't understand what 0x01 is at the beginning of the array

    can I use sendString instead?
    something like
    tx.sendString("say=hello");
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-05-07 04:38
    Yes.
    I think the 0x01 was a command byte (either for emic or their application).
    You must send the bytes in such a format as the emic requires (check emic datasheet).
    So if the emic understands "say=hello"
    then you can use tx.sendString("say=hello");

    If the emic requires an end of command marker like 0x0D (carriage return)
    then you should use tx.sendString("say=hello\r");

    regards peter
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-05-08 14:13
    In HEX (for EMIC):

    0x00 text to be spoken 0xAA

    Here is an example of how to say 'hello' in HEX mode:

    0x00, 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0xAA

    The 0x00 and the 0xAA are requierd in HEX mode only.

    In ASCII mode:

    say=hello;


    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-05-08 14:28
    So in ascii we may send
    · tx.sendString("say=hello;");
    The ; inside the string acts as terminator.

    Right?
    regards peter
Sign In or Register to comment.