AOSSIE-Org / AOSSIE-Org/DebateAI

[BUG]: Speech recognition in DebateRoom fails silently on unsupported browsers and lacks feedback on permission denial

Offen
#484 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
84
Forks
198
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
30

Beschreibung

### Bug Description

In `DebateRoom.tsx`, the Speech-to-Text feature relies on the Web Speech API (`SpeechRecognition` / `webkitSpeechRecognition`). Currently:
1. **Unsupported Browsers (e.g., Firefox, Brave):** `recognitionRef.current` remains `null`. Clicking the microphone button does nothing silently without explaining why to the user.
2. **Permission Denied (e.g., Chrome/Edge):** When a user denies or dismisses the browser's microphone permission prompt, `onerror` fires with `"not-allowed"`. The app handles this internally by turning off the recording state, but displays **no message or notification to the user**.
---

### Steps to Reproduce

**Test 1 (Unsupported Browser):**
1. Open the app in **Firefox**.
2. Go to `/startDebate` -> **Practice with Bot** -> enter `DebateRoom`.
3. Click the microphone button.
4. *Observed:* Nothing happens; no error or message is shown.

**Test 2 (Permission Denied in Chrome):**
1. Open the app in **Google Chrome**.
2. Enter `DebateRoom` and click the microphone button.
3. Click **Block** or close the browser permission prompt.
4. Click the microphone button again.
5. *Observed:* The mic toggles briefly and resets, but no feedback explains that permission was denied.
---

### Logs and Screenshots

_No response_

### Environment Details

OS: linux (ubuntu)
browser: firefox, chrome
node: v20.20.2

### Impact

Medium - Feature works but has issues

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start in DebateRoom.tsx by tracing the microphone button, recognitionRef.current setup, and the onerror handler. Reproduce the unsupported-browser case in Firefox and the permission-denied case in Chrome, then verify that each condition gives the user feedback and that recording still resets correctly.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
72/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.