Skip to content

Bug: Diarization broken — stale speech samples block new profiles, no delete UI #5266

Closed

Description

@omi-discord-vector

Bug: Diarization fails — stale speech samples block new profiles, no way to delete them

Platform: Android (latest app version)

Problem

Speaker diarization consistently fails to identify the user, even after re-recording voice profiles multiple times. The root cause is a combination of stale data and missing UI.

Root Cause (from code analysis)

1. Old speech samples block new ones

backend/utils/speaker_identification.py::extract_speaker_samples() checks:

sample_count = users_db.get_person_speech_samples_count(uid, person_id)
if sample_count >= 1:
    return  # Skips — won't store new sample

If a user already has a speech sample (even an outdated v1/v2 format one), re-recording the voice profile does nothing — the new sample is never stored because the old one blocks it.

2. Old samples are skipped during matching

The speaker embedding comparison code in transcribe.py skips people with outdated samples:

if person.get('speech_samples_version', 1) < 3:
    continue  # Skip — incompatible embedding format

So old samples both block new ones from being created AND are ignored during matching. The user is stuck — diarization can never work.

3. No UI to delete speech profiles

The API endpoints exist:

  • DELETE /v1/users/people/{person_id}/speech-samples — deletes all samples
  • DELETE /v1/users/people/{person_id}/speech-samples/{sample_index} — deletes one sample

But the app has no UI to access these. Users cannot delete old speech samples or reset their voice profile.

Additional Requirements for Diarization

Users may not realize all of these must be true:

  • Private Cloud Sync must be enabled (master switch for speaker ID)
  • Language must be set to English or Auto (speech profile path only works for en or auto)
  • Speech sample must be v3 format with valid embedding
  • Segment must be ≥2 seconds of continuous speech from one speaker

Expected Behavior

  • Re-recording voice profile should replace old samples, not be silently blocked
  • Users should be able to delete/reset their speech profile from the app
  • The app should clearly indicate when diarization prerequisites aren't met

Suggested Fix

  1. Allow sample replacement — when re-recording, delete old samples first, then store new ones
  2. Add "Reset Speech Profile" button — in Profile or Speech Profile settings, a button to delete all speech samples and start fresh
  3. Auto-migrate on re-record — if user re-records, force v3 migration regardless of old sample count
  4. Surface requirements — show a checklist of what's needed for diarization to work (cloud sync on, language en/auto, valid profile)

Reported by community member on Discord (Android).

Activity

  1. added
    bug
    on Mar 1, 2026
  2. added
    intelligence
    p2
    on Mar 2, 2026
  3. beastoin commented on Mar 2, 2026

    @beastoin
    Collaborator

    Needs more info — the report has detailed code analysis but is light on user-side evidence:

    1. What did you actually experience? — e.g. "I re-recorded my voice profile 3 times, but conversations still label me as Speaker 1"
    2. Screenshot of a conversation showing incorrect speaker labels
    3. App version and device model
    4. Is Private Cloud Sync enabled? (Settings → Cloud Sync)
    5. What language is set? (speech profiles currently require English or Auto)
    6. How many times did you re-record? What happened each time?

    The code analysis may be helpful for investigation later, but we need to confirm the actual user experience first. Adding needs-info.

  4. added
    needs-info
    on Mar 2, 2026
  5. beastoin commented on Mar 2, 2026

    @beastoin
    Collaborator

    One more thing — to help us look up your account and logs, please share your user ID (open Omi app → Settings → Profile → scroll to bottom). For privacy, redact the middle — e.g. abc...xyz.

    Also @aaravgarg — can we link the original Discord thread to this issue? Helps us follow up with the reporter.

  6. hugoaap-code commented on Mar 2, 2026

    @hugoaap-code

    Me again

    What did you actually experience?
    Diarization won't work at all, won't ID me or anyone.Never works.

    App version and device model
    524 (734) — samsung SM-S938B — Android 16

    Is Private Cloud Sync enabled?
    Yes

    What language is set?
    Portuguese only or Auto: won't work no matter what I choose.

    How many times did you re-record?
    several.

    What happened each time?
    recorded it and no diarization at all

  7. aryanorastar commented on Sep 20, 2026

    @aryanorastar
    Collaborator

    Closing as already fixed on current main.

    #14842 (merged 2026-09-19) lists #5266; extract_speaker_samples no longer early-returns on sample_count>=1; people.dart has deletePersonSample.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugintelligenceneeds-infop2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions