0

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);
}
lawchit
  • 3,043
  • 2
  • 13
  • 9
  • 1
    Go to Documents/Processing/libraries/stt/library and rename then unzip stt.jar -> notice the Minim library is included, but Processing already has it, so delete the Minim .jar files, and try to zip (no compression) the remaining files and rename.jar (I'm not 100% zipping will do the trick, depending on how OSX chooses to compress, so as an alternative there the JDK also has a `jar` command which will allow you package the .jar file from command line) – George Profenza Jun 04 '14 at 11:57
  • Just to be clear, rename the stt.jar (i'll rename it to stt2.jar) file to something else and then get rid of all of the minim parts contained inside, then change back to a .jar file? So I will only need sst2.jar file in the end of all this? Thank you for your response! – lawchit Jun 04 '14 at 19:45
  • I decided to just remove the Minim library from Processing itself and everything is now working fine. – lawchit Jun 05 '14 at 00:06
  • If you create a brand new sketch and go to Sketch > Import Library ... > minim and compile/run, does that still work ? – George Profenza Jun 05 '14 at 09:41

1 Answers1

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