8

In musicg I can compare fingerprints of Wave files by the following code :

double score =
new FingerprintsSimilarity(
    new Wave("voice1.wav").getFingerprint(),
    new Wave("voice2.wav").getFingerprint() ).getSimilarity();

Instead of saving audio and comparing, can I directly feed MIC input to get the fingerprints similarity ?

Eg :

double score =
new FingerprintsSimilarity(
    AudioFromMIC(),
    new Wave("voice2.wav").getFingerprint() ).getSimilarity();

Edit : In the Wave.java , function initWaveWithInputStream() can I send feed MIC input as Inputstream ? Is it possible ?

Senthil Kumar
  • 299
  • 1
  • 4
  • 14

1 Answers1

0

The Wave() method accepts only the InpustStream type as parameter. Please refer to the code below:

InputStream in1 = getResources().openRawResource(R.raw.sound1);
InputStream in2 = getResources().openRawResource(R.raw.sound2);

Wave wave1 = new Wave(in1);
Wave wave2 = new Wave(in2);
FingerprintSimilarity fingerprintSimilarity = wave1.getFingerprintSimilarity(wave2);
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
NeroVero
  • 13
  • 1
  • 4