←
LCA-9
Created: 2025-12-21
•
Updated: 2025-12-21
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-21
Implemented Gradio testing UI with STT/TTS tabs.
**Changes made:**
- Created `src/librechat_audio/gradio_app.py` with:
- STT tab: Record audio via microphone or upload file, select Local (parakeet-mlx) or OpenAI (Whisper) backend
- TTS tab: Enter text, select Local (Chatterbox) or OpenAI backend, voice selection for OpenAI
- Status messages for feedback
- Graceful handling when backends are unavailable
- Updated `pyproject.toml`:
- Added `[ui]` optional dependency group with gradio>=4.0.0
- Added `librechat-audio-ui` console script entry point
- Updated `src/librechat_audio/__init__.py`:
- Exported `create_gradio_app` function
- Created `tests/test_gradio_app.py` with 20 tests covering:
- Module imports and availability flags
- Client helper functions
- Transcription and synthesis functions
- Error handling when backends unavailable
- Package exports
**Verification:**
- All 423 tests pass (403 existing + 20 new)
- Gradio app can be launched with `librechat-audio-ui` command
**Usage:**
```bash
pip install 'librechat-audio[ui]' # Install with Gradio
librechat-audio-ui # Launch the UI
```