← 输入框|github.com|刷新
Skip to content
VideoAccessibilityPublic

About

ViDScribe Chrome extension for accessible video descriptions and visual question answering

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ViDScribe

A Chrome extension (Manifest V3) that adds AI audio descriptions and visual question answering to YouTube, built for blind and low-vision users. It injects a sidebar into the YouTube watch page, generates or retrieves per-timestamp descriptions, speaks them, and answers spoken or typed questions about what is on screen.

ViDScribe is a client of VidScribe's AWS backend. It does not run a server of its own.

A VidScribe account is required to generate descriptions or ask questions: both are writes, and the API layer refuses them without a session. Descriptions that already exist are a public read, so they load and play without signing in.

Quick start

npm install
npm run build          # bundles src/ -> dist/

Then: chrome://extensions → enable Developer mode → Load unpacked → select the dist/ folder.

There is nothing else to run. No backend, no API keys, no environment file. Speech in and out is handled by the browser.

How to test it

  1. Open any YouTube watch page. The sidebar appears at the top of the right-hand column.
  2. Sign in from the ViDScribe toolbar icon. Sign-in is in the popup, not the sidebar, because the sidebar is injected into youtube.com's DOM where page scripts could read a password field. Use a VidScribe account; the same credentials work on the VidScribe website.
  3. Press GENERATE AD. On a video VidScribe already knows, descriptions appear in about a second. On a new one, generation takes roughly 30 seconds to a few minutes.
  4. You should hear "Audio description ready." Descriptions appear as timestamped bubbles, each with a speaker button.
  5. Turn on AUTO DESCRIBE to have them read automatically as the video plays. It pauses at each segment, reads, and resumes.
  6. Open the Visual Question Answer tab, type or speak a question, and you get an answer about the current frame.

Open the page console and the service-worker console (chrome://extensions → service worker) to watch the requests. Every VidScribe call is logged.

Keyboard shortcuts

Action Default
Generate / regenerate description Alt+Shift+G (Ctrl+Shift+G on macOS)
Toggle Auto Describe Alt+Shift+D
Replay the last description Alt+Shift+R
Ask a question by voice Alt+Shift+V
Show/hide the sidebar unassigned; use the chevron in the panel header

Chrome allows an extension to suggest only four shortcuts. Reassign any of them, including the sidebar toggle, at chrome://extensions/shortcuts. The buttons show whatever key is actually bound, so the labels follow your changes.

Architecture

Chrome extension (dist/, built from src/)
  ├─ contentScript.js  sidebar UI, playback, voice input, VidScribe calls
  │                    (holds NO credentials)
  ├─ background.js     service worker: keyboard shortcuts, opens the popup
  └─ popup.js          ALL authentication; aws-amplify lives only here

VidScribe AWS backend (shared with the VidScribe website)
  ├─ Cognito user pool us-east-2_zaxKnt3Eh   (email sign-in, SRP)
  ├─ API Gateway   VidScribeDescriptions, VidScribeVideos
  └─ Lambda URLs   process-youtube (generation), ask-question (VQA)

Speech is entirely local. Descriptions are spoken by the browser's speechSynthesis; voice questions are transcribed by the browser's SpeechRecognition. No audio is sent to any ViDScribe-operated service. (In Chrome, SpeechRecognition routes audio to Google's speech service; that is a browser behaviour, documented in the privacy policy.)

Source layout

src/config.js         single source of endpoints + Cognito IDs
src/manifest.json     MV3 manifest (copied into dist/ at build time)
src/aws-api.js        VidScribe client + read-only auth state
src/popup.js          authentication (the only place Amplify is bundled)
src/sidebar.js        sidebar UI, AD playback, VQA, auto-describe
src/audio.js          speech engine + speaker/stop icons
src/settings.js       preferences (chrome.storage.sync)
src/contentScript.js  content-script entry, YouTube SPA navigation
src/background.js     service-worker entry

The endpoints this extension calls

All live in src/config.js. Behaviour below was verified against the live endpoints. Several of them are the reason src/aws-api.js looks the way it does.

Endpoint Used for
VidScribeDescriptions?youtube_url= Read descriptions for a watch URL
VidScribeDescriptions?video_id= Read descriptions by numeric id
VidScribeVideos?page=&page_size= Catalogue walk (fallback only)
process-youtube (Lambda URL) Generate descriptions for a video
ask-question (Lambda URL) Visual question answering

Server behaviour worth knowing

  • Every outcome is HTTP 200. A miss on VidScribeDescriptions is {"descriptions": "VIDEO_NOT_FOUND"} (a string, not an empty array), and a bad query is {"error": ...}. Callers must inspect the body, not the status. parseDescriptionRows() in aws-api.js handles this.
  • Rows come back unordered. One video returned 131s, 65s, 131s, 90s, 35s…. The extension sorts by timestamp_start in requestDescriptions(). Do not rely on server order.
  • An empty youtube_url= does not mean "not found". It returns some arbitrary video's descriptions. fetchDescriptionsByUrl() refuses to send one.
  • Re-processing a URL creates a NEW video row rather than replacing the old one, and ?youtube_url= returns one of them, not necessarily the newest. After a regenerate, a later page load can therefore show an earlier run's descriptions. Suggested fix: resolve a URL to its highest video_id.
  • Some videos hold two overlapping generation runs under one video_id, producing near-duplicate descriptions that pair up on the same start timestamps with different text.
  • VidScribeVideos answers OPTIONS with 405, so any request carrying a non-simple header fails CORS preflight. The extension keeps its GETs simple to avoid this.
  • The VQA Lambda rejects float timestamps (Float types are not supported, from DynamoDB). The extension floors them to whole seconds.

Known gaps

  • PRIVACY_POLICY.md needs a postal address and hosting at a public URL before store submission. Everything else in it is current.
  • The icons are upscaled. They are cut from the VD monogram in assets/Logo.png, which is only 73x47 native pixels, so the 128px icon is slightly soft. Regenerate from vector art if it becomes available.
  • Voices differ per machine. speechSynthesis uses whatever the operating system provides, so speech will not sound identical across test machines. Worth controlling for in a user study.
  • No automated tests.

About

ViDScribe Chrome extension for accessible video descriptions and visual question answering

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages