Musicg fingerprint for audio input
Asked Answered
T

1

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 ?

Teetotaler answered 7/7, 2015 at 3:25 Comment(2)
Hi, Have you been able to find a solution?Green
No.Not yet. Anything from your side ?Teetotaler
B
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);
Bohon answered 16/4, 2022 at 11:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.