Xcode - OpenEars model file error

I try to use OpenEars, but I get an annoying error. this error starts immediately when I try to start the application 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 hope you can help me. Best regards, Adi.

+4
source share
1 answer

OpenEars developer is here. As a general rule, it is best to ask questions about troubleshooting OpenEars-related issues in OpenEars forums, since I usually don't support OpenEars in stack overflows, and this is unlikely to be a problem that affects many users. To fix this, try these steps from the OpenEars documentation, which starts from the moment you created your language model using the CMU tool:

Download and unzip the archive. In this archive there will be a file with the suffix ".lm", which you should call what you like using suffix.languagemodel (for example, myvoiceproject.languagemodel). Do this renaming now in Finder (no later than after you imported the file into Xcode), making sure that you do not accidentally remove the suffix when renaming. You can verify this by dragging the file into Terminal.app and seeing that Terminal.app thinks the file is being called, which will correspond to what Xcode will assume it is called.

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

+6
source

All Articles