Shop OBEX P1 Docs P2 Docs Learn Events
IMP & Parallax Emic2 Text-to-Speech : Text breaks up after a few characters — Parallax Forums

IMP & Parallax Emic2 Text-to-Speech : Text breaks up after a few characters

Marcus KirschMarcus Kirsch Posts: 6
edited 2013-07-25 08:54 in General Discussion
Hello,

I have the module working, yet if I try some songs I found, the emic breaks after a few characters 20+ or so and reports an error. Is there something wrong with the text I deliver?
 writeMessage("[IH<200,23>Z<100>DHIH<200>S<100>DHAH<300>RIY<450>L<150>LAY<450>F<150>_<300>IH<200>Z<100>DHIH<200>S<100>JHAH<200>ST<100>FAE<200>N<100>TAH<300>SIY<600,20>_<300>KAO<200,22>T<100>IH<300>NAX<300>LAE<400,23>N<150>D<50>SLAY<500,22>D<100>NOW<150,18>AH<150>SKEY<200,23>P<100>FRAH<200>M<100>RIY<300>EH<300>LAH<300,22>TTIY<600,18>_<300>OW<300,15>PAH<200>N<100>YXOR<300>AY<750>Z<150>LUH<300>KAH<200>P<100>TUW<300>DHAX<300,16>SKAY<600,18>Z<150>AE<300,11>N<200>D<100>SIY<2400,20>].", "1");
        
function writeMessage(myMessage, myVoice)
{
    newMessage = false;
    if(!myVoice){ myVoice = "1"; }
    server.log("speak:"+myMessage);

    speechSerial.write('S');
    speechSerial.write(myMessage);
    speechSerial.write('\n'); // Speak

    server.log("spoken");
    
}


I am also struggling to kill&clean the system, meaning trying to make the speech stop to have a new speech starting.

Anyone?

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-15 08:51
    Are you checking that the Emic2 is done processing the current text before sending new text?

    When I've had problems with the Emic2 missing words or phrases it's because I wasn't giving it enough time to finish the previous text.

    IIRC, the Emic2 returns a ":" character to indicate it has completed processing the text. I believe it's common to wait for this character before sending new text to the Emic2.
  • ercoerco Posts: 20,256
    edited 2013-07-15 14:33
    Buffering...!
  • Marcus KirschMarcus Kirsch Posts: 6
    edited 2013-07-17 04:58
    No, its the first and only text I sent to it.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-07-17 10:03
    My original thought was the message was too long for the Emic2's buffer, but I see from the manual, it has a 1023 character buffer so your message shouldn't be too big.

    What is the limit (if there is one) the programming language places on strings you pass as an argument?

    What character(s) doe the line "speechSerial.write('\n');"send?
  • ercoerco Posts: 20,256
    edited 2013-07-17 11:13
    Could it be an Arduino issue, either compatibility or sending too long of a string? Plenty of Emic users here. Perhaps someone can test your text string on their setup.
  • Marcus KirschMarcus Kirsch Posts: 6
    edited 2013-07-25 08:54
    I am running the thing via an Electric Imp sparkfun breakout board. Its not arduino. Maybe thats teh main issue?

    I had more control when using an arduino. or so it seemed.
Sign In or Register to comment.