How piyushlavaniya/reinforcing-lipreading-with-llm works
This prototype lets a user select a video, view it, and get a lip-reading prediction refined by an LLM. The app loads the selected clip and its alignment, runs a checkpoint-backed model, decodes the output into text, then sends that text to an LLM. The README describes the app as an experimental prototype. The separate AI helper is included as a capability, but the sampled app code does not call it; the graph shows only relationships visible in the excerpts.
Main entry points: testing_app.py Video app · utils.py Video and label loader · modelutil.py Lip-reading model · test_videos Test videos
Components 11
User application
- Video app
testing_app.py
Video and labels
- Test videos
data/test_videos - Alignments
data/annotations - Video and label loader
utils.py
Lip-reading inference
- Lip-reading model
modelutil.py - Model weights
model_checkpoint - CTC text decoding
testing_app.py
Language refinement
- LLM prompt chain
testing_app.py - AI helper
aiutils.py
Other components
- User
- OpenAI-compatible LLM
Connections 11
- User → Video app: selects video
testing_app.py - Video app → Test videos: lists and renders
testing_app.py - Video app → Video and label loader: loads selected data
testing_app.py - Video and label loader → Test videos: reads frames
utils.py - Video and label loader → Alignments: reads labels
utils.py - Video app → Lip-reading model: loads model
testing_app.py - Lip-reading model → Model weights: loads weights
modelutil.py - Video app → CTC text decoding: decodes prediction
testing_app.py - Video app → LLM prompt chain: submits decoded text
testing_app.py - LLM prompt chain → OpenAI-compatible LLM: requests refinement
testing_app.py - AI helper → OpenAI-compatible LLM: requests response
aiutils.py