MaryTTS Exception NoClassDefFoundError: com/google/common/bas e/Joiner

MaryTTS Exception NoClassDefFoundError: com/google/common/bas e/Joiner

我正在从维基百科获取数据,并将它们提供给 MaryTTS,这是一个文本到语音库。

例如,我从维基百科 API 中获取文本,如下所示:Wikipedia API Summary Searching for Donald Trump

Java 产生问题的代码:


This line -> AudioInputStream audio = marytts.generateAudio(text); where MaryTTS is: MaryInterface marytts = new LocalMaryInterface();


导致错误的文本

Donald John Trump (born June 14, 1946) is the 45th and current President of the 
United States. Before entering politics, he was a businessman and television per
sonality.\nTrump was born and raised in Queens, New York City, and earned an eco
nomics degree from the Wharton School. He then took charge of The Trump Organiza
tion, the real estate and construction firm founded by his paternal grandmother,
 which he ran for 45 years until 2016. During his real estate career, Trump buil
t, renovated, and managed numerous office towers, hotels, casinos, and golf cour
ses. Besides real estate, he started several side ventures and has licensed the 
use of his name for the branding of various products and properties, including T
rump Entertainment Resorts. He was the founder of Trump University. He produced 
and hosted The Apprentice, a reality television series on NBC, from 2004 to 2015
. His net worth was estimated to be .5 billion as of 2017, making him the 544t
h richest person in the world.\nTrump first publicly expressed interest in runni
ng for political office in 1987. He won two Reform Party presidential primaries 
in 2000, but withdrew his candidacy early on. In June 2015, he launched his camp
aign for the 2016 presidential election and quickly emerged as the front-runner 
among seventeen candidates in the Republican primaries. His remaining opponents 
all suspended their campaigns by the end of May 2016, and in July he was formall
y nominated at the Republican National Convention along with Indiana governor Mi
ke Pence as his running mate. Many of his campaign statements were controversial
 or false, generating much free media coverage.\nTrump won the general election 
on November 8, 2016, in a surprise victory against Democratic opponent Hillary C
linton and commenced his presidency on January 20, 2017. He became the oldest an
d wealthiest person ever to assume the presidency, the first without prior milit
ary or government service, and the fifth to have won the election while losing t
he popular vote. His political positions have been described by scholars and com
mentators as populist, protectionist, and nationalist."}}}}

错误:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/bas
e/Joiner
    at marytts.language.en.Preprocess.expandConsonants(Preprocess.java:497)
    at marytts.language.en.Preprocess.expand(Preprocess.java:382)
    at marytts.language.en.Preprocess.process(Preprocess.java:186)
    at marytts.server.Request.processOneChunk(Request.java:566)
    at marytts.server.Request.processOrLookupOneChunk(Request.java:403)
    at marytts.server.Request.process(Request.java:337)
    at marytts.LocalMaryInterface.process(LocalMaryInterface.java:438)
    at marytts.LocalMaryInterface.generateAudio(LocalMaryInterface.java:348)
    at application.TextToSpeech.speak(TextToSpeech.java:63)
    at application.WikipediaTalker.main(WikipediaTalker.java:52)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Joiner
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 10 more

这对 MaryTTS 团队来说非常非常奇怪,他们似乎忽略了这个错误的发生,通过在项目 [=17] 上添加 Guava 22.0 解决了这个问题=] 路径。

我也看不出有什么地方需要提及:( .