omi icon indicating copy to clipboard operation
omi copied to clipboard

Speaker introductions never detect names with accented letters ("Me llamo José", "Ich heiße Jürgen", "Меня зовут Фёдор")

Open apoorvdarshan opened this issue 1 month ago • 1 comments

Product impact

  • Primary loop layer: Understand
  • [ ] Involves data loss, failed capture, or broken sync/trust. Nothing is lost, but a person whose name has an accent is never named from their introduction.

Describe the bug The Latin-script self-introduction patterns in backend/utils/speaker_identification.py capture the name with ([A-Z][a-zA-Z]*)\b. The Russian pattern uses ([А-Я][а-я]*)\b, which leaves out Ё/ё. \b cannot fall between two letters, so one accented letter anywhere in the name makes the whole introduction match nothing.

On current main, detect_speaker_introduction returns None for all of these, with or without the language hint:

  • "Me llamo José"
  • "Ich heiße Jürgen"
  • "Je m'appelle Hélène" / "Je m'appelle Émile"
  • "Nazywam się Łukasz"
  • "Jag heter Åsa", "Jeg heter Øystein", "Jeg hedder Søren"
  • "Mă numesc Ștefan", "Benim adım Özgür", "Jmenuji se Šárka"
  • "Tên tôi là Đức", "Tên tôi là Nguyễn Văn An"
  • "My name is Zoë", "I'm Renée"
  • "Меня зовут Фёдор", "Я Пётр"

The same sentences with an ASCII name ("Me llamo Carlos") work.

The result feeds both naming paths:

  • Live (routers/listen/transcripts.py): no speaker suggestion, no lookup of the existing person, and no new person even for an explicit "Me llamo José" with Auto-create Speakers on.
  • Sync text naming (utils/sync/speaker_identity.py): the existing person is never resolved from the introduction.

To Reproduce

  1. On an account where automatic speaker naming is available, have a person named "José" in People, or turn on Auto-create Speakers.
  2. In a live conversation, another speaker says "Hola, me llamo José."
  3. Nothing is suggested or assigned from the introduction. "Hola, me llamo Carlos." is detected.

Hermetic check: on current main, detect_speaker_from_text("Me llamo José", language="es") returns None.

Current behavior In the 24 Latin-script languages in the table, and in Russian when the name contains ё, introductions are detected only when the name is plain ASCII.

Expected behavior Names with diacritics are detected like ASCII names ("José", "Jürgen", "Łukasz", "Đức", "Фёдор"). The name still has to start with a capital letter, so "Ich bin müde" stays unmatched.

Evidence (main 5d435365f6)

  • Pattern table: https://github.com/BasedHardware/omi/blob/5d435365f665389137c49118d52cf82bfaa2850b/backend/utils/speaker_identification.py#L147-L252
  • Russian pattern: https://github.com/BasedHardware/omi/blob/5d435365f665389137c49118d52cf82bfaa2850b/backend/utils/speaker_identification.py#L231-L233
  • Hungarian name-first copula key, which has to change with its pattern: https://github.com/BasedHardware/omi/blob/5d435365f665389137c49118d52cf82bfaa2850b/backend/utils/speaker_identification.py#L311
  • Live detection and suggestion: https://github.com/BasedHardware/omi/blob/5d435365f665389137c49118d52cf82bfaa2850b/backend/routers/listen/transcripts.py#L1555-L1590
  • Sync text naming: https://github.com/BasedHardware/omi/blob/5d435365f665389137c49118d52cf82bfaa2850b/backend/utils/sync/speaker_identity.py#L337-L339

Additional context #22332 is a different bug in the same function: it re-cases names that do match. A fix with regression tests follows in a PR.

apoorvdarshan avatar Oct 19 '26 03:10 apoorvdarshan

I have resolved this issue in PR #23323 (https://github.com/BasedHardware/omi/pull/23323).

Summary of Fix:

  • Replaced ASCII-only [A-Z][a-zA-Z]* with _LATIN_NAME_PATTERN supporting uppercase Latin letters with diacritics and subsequent Unicode letters.
  • Included Cyrillic Ё/ё in Russian and Bulgarian speaker introduction patterns.
  • Updated Hungarian copula patterns in _NAME_FIRST_COPULAR_PATTERNS.
  • Added unit tests in backend/tests/unit/test_speaker_introduction_accented_names.py covering all accented names and languages from the issue, along with negative checks ("Ich bin müde") and backward compatibility tests (100% pass rate).

Payout Wallet: 0xC345C07229307d4f1c7935aD2cAe48e390215808 (USDC)

Dimank92 avatar Oct 22 '26 16:10 Dimank92