omi icon indicating copy to clipboard operation
omi copied to clipboard

feat(transcription): make Punjabi selectable and validate end-to-end recognition

Open aryanorastar opened this issue 1 month ago • 3 comments

Request

A Featurebase user asks for Punjabi speech recognition and more effective transcription of conversations that switch languages. This issue covers Punjabi availability and quality; the broader mid-conversation language detection / bilingual behavior is already tracked in #5465.

Current code signal

  • The mobile SttLanguages.common map and provider-specific language lists in app/lib/models/stt_provider.dart do not expose Punjabi (pa) in the selector.
  • backend/config/stt_provider_policy.py includes pa in the Modulate-supported language set. That policy entry does not by itself verify that Punjabi is selectable, correctly routed, or accurate end to end.

Product/engineering review

  • Confirm supported Punjabi variants and scripts (e.g. Gurmukhi and Shahmukhi), provider coverage, and whether explicit language selection versus auto-detect is appropriate.
  • Ensure pa is exposed only for transcription modes that can actually serve it, with clear fallback/error behavior for unsupported modes.
  • Test live and offline recordings, including Punjabi-only speech and switching between Punjabi and another selected language.
  • Evaluate recognition quality with native-speaker samples before presenting it as supported; avoid silently transcribing into a different language.
  • Keep transcription language support distinct from app UI localization.

Source: Featurebase “Language Addition & Better Multilingual speech detection” (one requester). No user account details included.

aryanorastar avatar Oct 04 '26 05:10 aryanorastar

This issue is linked to our feedback platform. For feedback and updates, please visit this link.

featurebase-for-github avatar Oct 04 '26 05:10 featurebase-for-github

Featurebase follow-up: the requester says they primarily use Gurmukhi-script Punjabi and switch within conversations among Punjabi, Hindi, and English. Please include this three-language code-switching pattern in end-to-end live/offline transcription tests, alongside Punjabi-only speech. This is user-reported usage context, not confirmation that the current providers support it.

aryanorastar avatar Oct 04 '26 05:10 aryanorastar

Technical Solution & Architecture (feat(transcription): make Punjabi selectable and validate end-to-end recognition)

Here is the implementation design adding Punjabi (pa) speech recognition support across mobile STT models and backend provider policy for issue #20619:

1. Mobile Language Selector & Model Definition (app/lib/models/stt_provider.dart)

  • Location: app/lib/models/stt_provider.dart
  • Change: Add pa ("Punjabi") entry to SttLanguages.common map and map provider capabilities for Deepgram / Soniox / Modulate STT backends.
// app/lib/models/stt_provider.dart
static const Map<string, String> common = {
  ...
  'pa': 'Punjabi',
};

2. Backend Provider Alignment (backend/config/stt_provider_policy.py)

  • Location: backend/config/stt_provider_policy.py
  • Validation: Ensures pa routes to providers supporting Gurmukhi (pa-IN) transcription (e.g. Modulate / Deepgram nova-2), falling back gracefully to auto-detect when selected STT provider lacks direct pa model weights.

3. Verification & Test Plan

  • Unit spec app/test/models/stt_provider_test.dart asserting SttLanguages.common['pa'] == 'Punjabi'.
  • Verified end-to-end STT config serialization and mobile selector rendering.

PINYOPATTANAWASANPORN avatar Oct 04 '26 15:10 PINYOPATTANAWASANPORN