TTlaji 67dcea21d0
Deploy Speaking Practice / deploy (push) Successful in 2m13s
style: polish responsive typography and transcript states
2026-06-09 22:56:57 +08:00
2026-06-05 16:56:30 +08:00
2026-06-04 23:59:09 +08:00
2026-06-05 00:25:20 +08:00
2026-06-05 00:25:20 +08:00
2026-06-05 16:56:30 +08:00
2026-06-08 19:13:47 +08:00
2026-06-05 16:56:30 +08:00
2026-06-05 16:56:30 +08:00
2026-06-03 00:34:42 +08:00

Speaking Lab

Local first-version prototype for English speaking practice.

Install

Install the backend dependencies when running the FastAPI server locally:

python -m pip install fastapi uvicorn python-multipart

python-multipart is required because POST /api/videos uses FastAPI Form and File uploads.

Run

cd F:\ooo\speaking-practice-local
python -m uvicorn backend.main:app --reload --host 127.0.0.1 --port 8000

Open:

http://127.0.0.1:8000

API docs:

http://127.0.0.1:8000/docs

Admin page:

http://127.0.0.1:8000/admin.html

What works

  • Local video library with tags and fuzzy keyword search.
  • Basic login/register stored in browser localStorage.
  • Admin mode when the email contains admin.
  • Favorites and watch-later lists.
  • Dedicated admin page for adding and deleting materials.
  • Admin upload for local video files or video/HLS URLs.
  • Admin upload for English and Chinese .srt / .vtt subtitles.
  • Multilingual subtitle selectors.
  • Bilingual subtitle display.
  • Click transcript lines to jump the video to the matching timestamp.
  • Current transcript line highlighting.
  • Sentence replay, previous/next sentence, sentence loop.
  • Browser microphone recording and local playback.

Notes

  • This first version is a local browser app, not a production server app.
  • User login state, favorites, and watch-later lists are still stored in browser localStorage.
  • Added content library videos and subtitles are persisted through the FastAPI backend.
  • FastAPI initializes backend/speaking_lab.sqlite on startup.

Content Library

The admin page saves videos and subtitles through the FastAPI backend.

Supported first-version flow:

  • Log in with an email containing admin.
  • Click the small 管理 button beside the 素材 heading, or open /admin.html.
  • Add a title, speaker, description, and comma-separated tags.
  • Choose either a local video file or a video/HLS URL.
  • Optionally upload English and Chinese .srt / .vtt subtitle files.
  • Delete materials from the admin page when you no longer want them.
  • Refresh the browser and confirm the added video remains in the library.

Uploaded files are stored locally:

  • Videos: uploads/videos/
  • Subtitles: uploads/subtitles/

Metadata is stored in SQLite:

  • backend/speaking_lab.sqlite

Admin Page

Content management is handled on a separate local admin page:

http://127.0.0.1:8000/admin.html

In this prototype, an admin is any local user whose email contains admin. After logging in as an admin on the study page, a small 管理 button appears beside the 素材 heading. The admin page supports adding and deleting materials. Editing and subtitle replacement are planned for later.

This phase does not include web editing, real authentication, learning progress sync, or server deployment.

S
Description
No description provided
Readme
254 KiB
0 Stars 8 Watchers 0 Forks
Languages
JavaScript 55.6%
Python 20.3%
CSS 16.2%
HTML 6.9%
Batchfile 1%