I am trying to get a simple example sketch running from the STT Library for Processing, and when running the sketch I am prompted with this:
And then I am met with the error 'Duplicate libraries found for ddf.minim' with the following output:
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)
Looking into Processing's contents, there is only one 'minim' library folder.
Here is the example code I am trying to run:
/*
// 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);
}
I had the same problem, You need to remove the lib file in the library you just downloaded and it will fix the problem, Also (Not recommended) You can go to your processing folder go to core/library and remove the lib file from there as well keep in mind if you do that then you need to add that library file each time you need it in a project