Skip to content

Fix on-device transcription failing with non-default system region#57

Open
brianchiruka wants to merge 1 commit into
palmier-io:mainfrom
brianchiruka:fix/locale-unicode-extension-transcription
Open

Fix on-device transcription failing with non-default system region#57
brianchiruka wants to merge 1 commit into
palmier-io:mainfrom
brianchiruka:fix/locale-unicode-extension-transcription

Conversation

@brianchiruka

@brianchiruka brianchiruka commented Jun 20, 2026

Copy link
Copy Markdown

Summary

  • matchLocale was calling candidate.region?.identifier directly on the raw locale, so a locale like en-US-u-rg-zazzzz (English US language + South Africa region) produced a garbled region and failed to match any supported Speech locale
  • Fix strips the Unicode extension suffix (-u-*) from the BCP 47 identifier before matching, leaving a clean tag like en-US that the Speech framework recognises

Repro

System language: English (US), Region: South Africa → locale becomes en-US-u-rg-zazzzz → transcription fails with "On-device transcription is not available for en-US-u-rg-zazzzz"

Language & Region settings showing English US language with South Africa region

Test plan

  • Set System Settings → General → Language & Region to any language with a mismatched region (e.g. English US + South Africa)
  • Open a video in the timeline and trigger transcription
  • Confirm transcription completes instead of showing the unsupported locale error

…sion

Locales like en-US-u-rg-zazzzz (English US language + South Africa region)
are not recognised by Apple's Speech framework. Strip the -u-* extension
before matching against supported locales so the base tag (e.g. en-US) is
used for lookup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@brianchiruka brianchiruka changed the title Fix transcription failing when system locale has Unicode region extension Fix on-device transcription failing with non-default system region Jun 20, 2026
TimLai666 added a commit to TimLai666/fronda that referenced this pull request Jun 23, 2026
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.

1 participant