Open
Conversation
trzy
reviewed
Mar 1, 2024
| class VoiceSample(CreatedAtMixin, table=True): | ||
| id: Optional[int] = Field(default=None, primary_key=True) | ||
| filepath: str = Field(...) | ||
| speaker_embeddings: dict = Field(default={}, sa_column=Column(JSON)) |
Contributor
There was a problem hiding this comment.
If the key is embedding model can we name this explicitly speaker_embeddings_by_model?
Bakuutin
reviewed
Apr 6, 2024
| # Use batch operations to support SQLite ALTER TABLE for adding constraints | ||
| with op.batch_alter_table('utterance', schema=None) as batch_op: | ||
| batch_op.add_column(sa.Column('person_id', sa.Integer(), nullable=True)) | ||
| batch_op.create_foreign_key('fk_utterance_person', 'person', ['person_id'], ['id']) |
There was a problem hiding this comment.
Would it make sense to store the vector embedding of the voice here? This way, we would be able to
- Show distinct speakers in the UI even without having the Persons in the DB
- On creating a new person, easily find all the instances in the past when that person spoke by fetching all the utterances with similar enough voice embeddings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds person and voice sample models. Also adds an abstract identification service which we can implement for different embedding models/strategies.
Persons can be enrolled from the CLI, but we will be able to tag them from the UI as well. actual identification not implemented yet.