add addVoicePrint methods#23
Conversation
amaurycrickx
left a comment
There was a problem hiding this comment.
I don't think these methods should be added to the public api for the reasons mentioned in the comments.
But I sincerely want to thank you and express my gratitude for taking the time to submit this pr
Apologies for taking a couple of eternities before providing feedback
Cheers
Amaury
| * @return the voice print itself | ||
| */ | ||
|
|
||
| public synchronized VoicePrint addVoicePrint(K userKey, VoicePrint voicePrint) { |
There was a problem hiding this comment.
Hi, thanks for creating this pr
Better to get feedback late than never, I guess...
I'd think this method is unnecessary: when using the constructor
Recognito(float sampleRate, Map<K, VoicePrint> voicePrintsByUserKey)
The user already provides all the persisted voicePrints.
Since Recognito creates and stores all instances of VoicePrint, I don't see how an external VoicePrint could be provided.
Also note: having the inner synchronized block seems superfluous because "this" is already locked at method level
| * @return the voice print extracted from the given features | ||
| */ | ||
|
|
||
| public synchronized VoicePrint addVoicePrint(K userKey, double[] features) { |
There was a problem hiding this comment.
How features are eventually stored in a VoicePrint should remain private API and the user has no reason to depend on it.
A more advanced version of VoicePrint would most likely involve multiple dimensions to the VoicePrint and not just an array of doubles.
The class VoicePrint implements the interface Serializable. After persisting these files, as far as i can see, there is no method to "load" exactly these voiceprint again into the recognito-object without having the wavfiles. The advantage of these implemented method is, that there is no need to have the wav-files anymore for comparing against voiceprints. Especially the size of wav-files could be a problem for a situation with a lot of wav-files. This implementation could be a solution for this problem.