platform icon indicating copy to clipboard operation
platform copied to clipboard

feat(love): enable transcription language selector and restore Deepgram language support

Open spatialy opened this issue 9 months ago • 3 comments

Summary

Fixes #10532.

The RoomLanguageSelector component was fully built (45 languages, flag emojis, live update via client.diffUpdate) but commented out in RoomTranscriptionSettings.svelte, so every room defaulted to English with no way to change it from the UI. OpenAI STT users in non-English environments received garbled output with ~30% confidence scores.

Changes

plugins/love-resources/src/components/RoomTranscriptionSettings.svelte

  • Uncomment the language selector antiGrid-row that was blocked behind <!-- ... -->
  • Add missing imports: ui (plugin reference, for ui.string.Language) and RoomLanguageSelector

plugins/love-resources/src/components/AddRoomPopup.svelte

  • Replace hardcoded language: 'en' with getDefaultLanguage() which reads navigator.language
  • Checks full locale first (zh-TW, en-GB, …), falls back to base language (zh, en, …), then to 'en' if not in the supported list

services/ai-bot/love-agent/src/deepgram/stt.ts

  • Restore private language: string = 'multi' (default preserves existing Nova-3 auto-detect behaviour)
  • Uncomment the updateLanguage() stop/restart implementation so language changes propagate to active connections
  • Wire this.language through getOptions() instead of hardcoded 'multi'
  • Remove the now-redundant commented-out local variable in processTrack

Behaviour after this change

Scenario Before After
Room language setting visible ❌ Hidden ✅ Shown in transcription settings
New room language default Always 'en' Browser locale (fallback 'en')
OpenAI STT language Always 'en' → garbled for non-English Follows room language setting
Deepgram STT language Always 'multi' (hardcoded) 'multi' by default; follows room language if changed
Mid-meeting language change (Deepgram) No-op Restarts connections with new language

Test plan

  • [ ] Open a Room's transcription settings — language selector row is visible
  • [ ] Change language in settings — selector persists after page refresh
  • [ ] Start a meeting in a non-English room with OpenAI STT — transcriptions are in the correct language
  • [ ] Create a new room from a non-English browser locale — room defaults to that locale
  • [ ] Deepgram: change room language mid-meeting — connections restart and use new language
  • [ ] Deepgram: leaving language at default — 'multi' auto-detect is unchanged

spatialy avatar Feb 20 '26 18:02 spatialy

Connected to Huly®: UBERF-15625

huly-github-staging avatar Feb 20 '26 18:02 huly-github-staging

Hi @kristina-fefelova Could you please take a look at this PR? Perhaps you remember better why language selector was disabled.

ArtyomSavchenko avatar Feb 27 '26 05:02 ArtyomSavchenko

We did not use language selector because we use the nova-3 model with automatic language detection (English, Spanish, French, German, Hindi, Russian, Portuguese, Japanese, Italian and Dutch).

kristina-fefelova avatar Mar 06 '26 05:03 kristina-fefelova