我正在尝试从STT Library for Processing运行一个简单的示例草图,当运行草图时,我会提示:
然后我遇到了错误'为ddf.minim找到的重复库'输出如下:
processing.app.SketchException: Duplicate libraries found for ddf.minim.
at processing.app.Mode.getLibrary(Mode.java:333)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:434)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:192)
at processing.mode.java.JavaBuild.build(JavaBuild.java:151)
at processing.mode.java.JavaBuild.build(JavaBuild.java:130)
at processing.mode.java.JavaMode.handleRun(JavaMode.java:120)
at processing.mode.java.JavaEditor$23.run(JavaEditor.java:697)
at java.lang.Thread.run(Thread.java:745)
查看处理内容,只有一个' minim'库文件夹。
以下是我尝试运行的示例代码:
/*
// Using External Microphones with STT
// www.getflourish.com/sst/
//
// Florian Schulz 2013
*/
import com.getflourish.stt.*;
import ddf.minim.*;
import javax.sound.sampled.*;
STT stt;
String result;
String key = "api key goes here";
void setup ()
{
size(600, 200);
// Init STT automatically starts listening
stt = new STT(this, key);
stt.enableDebug();
stt.setLanguage("en");
// Display available Inputs with id and name
Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();
for(int i = 0; i < mixerInfo.length; i++)
{
println("### " + i + ": " + mixerInfo[i].getName());
}
// Set input (e.g. 0)
Mixer mixer = AudioSystem.getMixer(mixerInfo[0]);
// Update the Minim instance that STT is using
Minim minim = stt.getMinimInstance();
minim.setInputMixer(mixer);
println("### Source set to: " + mixerInfo[0]);
}
// Method is called if transcription was successfull
void transcribe (String utterance, float confidence)
{
println(utterance);
result = utterance;
}
public void keyPressed () {
stt.begin();
}
public void keyReleased () {
stt.end();
}
void draw ()
{
background(0);
}
答案 0 :(得分:0)
我有同样的问题,您需要删除刚下载的库中的lib文件,它将解决问题,另外(不推荐)您可以转到处理文件夹转到核心/库并删除lib文件从那里开始记住,如果你这样做,那么你需要在项目中每次需要时添加该库文件