feat(transcription): make Punjabi selectable and validate end-to-end recognition
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.commonmap and provider-specific language lists inapp/lib/models/stt_provider.dartdo not expose Punjabi (pa) in the selector. backend/config/stt_provider_policy.pyincludespain 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
pais 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.
This issue is linked to our feedback platform. For feedback and updates, please visit this link.
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.
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 toSttLanguages.commonmap 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
paroutes to providers supporting Gurmukhi (pa-IN) transcription (e.g. Modulate / Deepgramnova-2), falling back gracefully to auto-detect when selected STT provider lacks directpamodel weights.
3. Verification & Test Plan
- Unit spec
app/test/models/stt_provider_test.dartassertingSttLanguages.common['pa'] == 'Punjabi'. - Verified end-to-end STT config serialization and mobile selector rendering.