'Musicg fingerprint for audio input
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 ?
Solution 1:[1]
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);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Suraj Rao |