4

I'm trying to use OpenEars but i get an annoying error. that error starts immediately when i try to run the app after i added the languagemodel file to my project. here is the error:

Lex /Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm
    cd "/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3"
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    lex -o/Users/ilizabetabibi/Library/Developer/Xcode/DerivedData/TTSTest3-dsfbczwtfautfsglnlohlfwwgmjt/Build/Intermediates/TTSTest3.build/Debug-iphonesimulator/TTSTest3.build/DerivedSources/4075.languagemodel.yy.m "/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm"

/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:6: name defined twice
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:9: name defined twice
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:12: bad character: \
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:12: unknown error processing section 1
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:12: unknown error processing section 1
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:12: bad character: \
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:14: name defined twice
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:15: name defined twice
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:17: bad character: \
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:17: bad character: 1
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:17: bad character: -
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:17: unknown error processing section 1
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:17: bad character: :
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: -
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 0
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: .
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 7
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 7
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 8
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 2
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: <
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: /
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: unknown error processing section 1
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:18: bad character: 
/Users/ilizabetabibi/Desktop/Adi apps/TTSTest3/TTSTest3/../../../../Downloads/TAR4075/4075.languagemodel.lm:58: premature EOF
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

here is the language model file :

\data\
ngram 1=10
ngram 2=16
ngram 3=8

\1-grams:
-0.7782 </s> -0.3010
-0.7782 <s> -0.2218
-1.6812 BACKWARD -0.2218
-1.6812 FORWARD -0.2218
-1.6812 GO -0.2218
-1.6812 LEFT -0.2218
-1.6812 RIGHT -0.2218
-1.6812 START -0.2218
-1.6812 STOP -0.2218
-1.6812 TURN -0.2218

\2-grams:
-1.2041 <s> BACKWARD 0.0000
-1.2041 <s> FORWARD 0.0000
-1.2041 <s> GO 0.0000
-1.2041 <s> LEFT 0.0000
-1.2041 <s> RIGHT 0.0000
-1.2041 <s> START 0.0000
-1.2041 <s> STOP 0.0000
-1.2041 <s> TURN 0.0000
-0.3010 BACKWARD </s> -0.3010
-0.3010 FORWARD </s> -0.3010
-0.3010 GO </s> -0.3010
-0.3010 LEFT </s> -0.3010
-0.3010 RIGHT </s> -0.3010
-0.3010 START </s> -0.3010
-0.3010 STOP </s> -0.3010
-0.3010 TURN </s> -0.3010

\3-grams:
-0.3010 <s> BACKWARD </s>
-0.3010 <s> FORWARD </s>
-0.3010 <s> GO </s>
-0.3010 <s> LEFT </s>
-0.3010 <s> RIGHT </s>
-0.3010 <s> START </s>
-0.3010 <s> STOP </s>
-0.3010 <s> TURN </s>

\end\

i really hope you can help me. Best regards, Adi.

Adi
  • 103
  • 1
  • 10

1 Answers1

6

OpenEars developer here. Generally it's best to ask OpenEars-related troubleshooting questions in the OpenEars forums since I don't usually support OpenEars on Stack Overflow and this is unlikely to be an issue which affects many Stack Overflow users. To fix it, please try these steps from the OpenEars documentation which begin from the point that you have generated your language model using the CMU tool:

Download and unzip the archive. In this archive will be a file with the suffix “.lm” which you should name to whatever you like with the suffix .languagemodel (for instance, myvoiceproject.languagemodel). Do this renaming now in the Finder (not later after you have imported the file into Xcode), making sure that you don’t accidentally remove the suffix while renaming. You can verify this by dragging the file into Terminal.app and seeing what Terminal.app thinks the file is called, which will match what Xcode will think it is called.

The reason for this step is that depending on version, Xcode sometimes ignores and sometimes attempts to compile a file with the suffix .lm.

Halle
  • 3,584
  • 1
  • 37
  • 53
  • thats exactly what happened, the Xcode crushed because it compiled the lm file. is there any way to make the Xcode not compile it? – Adi Jun 22 '12 at 17:08
  • 1
    Beside the documented way I quoted above, you can select "Plain Text" in the "File Type" dropdown menu for the file under Xcode's "Identity & Type" pane in the File Inspector. – Halle Jun 22 '12 at 17:18
  • Thanks a lot its working :) how do I increase your reputation? I'm new here – Adi Jun 22 '12 at 19:18
  • Glad to hear it! Accepting the answer is enough, reputation-wise, since it tells others who might be searching later that the answer is correct. If you see an answer (or a question) that you think is good on Stack Overflow you also can click the upward-pointing arrow over the answer score to upvote it and that gives the answerer or asker more rep. Feel free to visit the OpenEars forums for your next question: http://www.politepix.com/forums/openears – Halle Jun 22 '12 at 19:30
  • Not using OpenEars but this helps in any file which ends with .lm – Kwok Pan Fung Apr 06 '13 at 16:35