Skip to content

add addVoicePrint methods#23

Open
alexbuechel wants to merge 1 commit into
amaurycrickx:masterfrom
alexbuechel:master
Open

add addVoicePrint methods#23
alexbuechel wants to merge 1 commit into
amaurycrickx:masterfrom
alexbuechel:master

Conversation

@alexbuechel
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Owner

@amaurycrickx amaurycrickx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants