I'll implement both requests. Let me start by creating a modular tips data file that generates a large pool (10,000) of recording tips.
Now the modular TipsRotator component that rotates a tip every 5 seconds with a smooth fade.
Now let me enhance the speech utility to support a proper language list and better mixed-language handling.
Now let me update App.tsx. First the imports and language state:
Now let me add a language localStorage key and state. Let me view the relevant section:
Now let me view the state declarations and transcript refs to add language state:
Now let me persist the language and keep the ref in sync. Let me add an effect after the settings persist effect:
Now let me update the startTranscriptCapture function to use the language ref, auto-restart on end, and handle mixed languages:
Now let me find and replace the activeFeatures logic and its render:
Now let me remove the activeFeatures useMemo block:
Now replace the tags render block with the TipsRotator:
Now let me find the live transcript UI section to add the language selector:
Now let me remove the unused useMemo and SparkIcon imports:
Now let me build to verify everything compiles:
Build succeeded. Here's a summary of both fixes:
1. ✅ Rotating Tips (replaced the static tags)
Removed the "Studio Pure Raw / Live Transcript / Multi Export" tags.
Added a rotating tip that changes every 5 seconds with a smooth fade:
src/data/tips.ts — modular tips engine. It generates 10,000 unique tips (20 prefixes × 50 cores × 10 suffixes), so nothing is repeated. Each combination reads as a natural, complete sentence. Includes:
getTipAt(index), getRandomTip(), buildTipOrder() (shuffled non-repeating order), and TIP_COUNT.
src/components/TipsRotator.tsx — self-contained component. Fades out → swaps → fades in every 5s. You can change the interval via intervalMs.
To add/edit tips later, just edit the fragment arrays in src/data/tips.ts — fully modular.
2. ✅ Language detection fix (incl. mixed languages)
The Web Speech API can only listen in one language at a time and has no true auto-detect, which is why your speech wasn't being caught (it defaulted to a language you weren't speaking). Fixes:
- Language selector dropdown in the Live Transcript panel with 20 languages (Bangla BD/IN, English US/UK/IN, Hindi, Urdu, Arabic, and more) + "Auto (device language)". Your choice is saved to localStorage.
resolveLang() maps "auto" → your device language.
- Auto-restart engine: recognition now automatically restarts after silences/timeouts (
shouldListenRef + onend re-spawn), so long or code-switched speech keeps transcribing instead of silently stopping.
maxAlternatives = 3 for better guesses on mixed words.
- Fallback: if the chosen language isn't supported, it falls back to the device language.
- A helper note (in Bangla) tells users: for a recording with multiple languages, pick the primary language for best results.
Note: True simultaneous multi-language transcription (e.g., Bangla+English+Hindi mixed in one sentence) isn't possible with any browser's built-in engine — that requires a cloud AI model. The selector + auto-restart gives the best achievable result locally. If you'd like, I can add optional cloud transcription (e.g., Whisper/Deepgram) for real mixed-language accuracy.
Files built: src/data/tips.ts, src/components/TipsRotator.tsx, src/utils/speech.ts, src/App.tsx