-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speaker identification WIP #46
base: main
Are you sure you want to change the base?
Conversation
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the key is embedding model can we name this explicitly speaker_embeddings_by_model?
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.