gpt4 book ai didi

objective-c - Xcode - OpenEars 语言模型文件错误

转载 作者:太空狗 更新时间:2023-10-30 04:02:19 25 4
gpt4 key购买 nike

我正在尝试使用 OpenEars,但出现了一个恼人的错误。当我将语言模型文件添加到我的项目后尝试运行该应用程序时,该错误立即开始。这是错误:

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

这是语言模型文件:

\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\

我真的希望你能帮助我。最好的问候,阿迪。

最佳答案

这里是 OpenEars 开发者。一般来说,最好在 OpenEars 论坛中询问与 OpenEars 相关的故障排除问题,因为我通常不支持 Stack Overflow 上的 OpenEars,而且这不太可能成为影响许多 Stack Overflow 用户的问题。要修复它,请尝试 OpenEars 文档中的这些步骤,这些步骤从您使用 CMU 工具生成语言模型开始:

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.

这一步的原因是,根据版本的不同,Xcode 有时会忽略,有时会尝试编译后缀为 .lm 的文件。

关于objective-c - Xcode - OpenEars 语言模型文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11158035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com