首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MaryTTS异常NoClassDefFoundError: com/google/common/bas /Joiner

MaryTTS异常NoClassDefFoundError: com/google/common/bas /Joiner
EN

Stack Overflow用户
提问于 2017-06-11 02:38:05
回答 1查看 166关注 0票数 1

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

例如,我从维基百科API中获取文本,如下所示:维基百科API摘要搜索唐纳德·特朗普

产生问题的Java代码:

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

导致错误的文本

代码语言:javascript
复制
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 $3.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."}}}}

错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-11 03:48:31

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

我也看不出在这些城市里有什么地方要提到:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44479883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档