Skip to content

Commit 644ba89

Browse files
LectureFlow v3.0.0
Local web app and desktop app (Electron) that turns lecture recordings into bilingual English-Chinese transcripts: transcription with faster-whisper, OpenVINO, MLX or Google Colab; correction and translation through an OpenAI-compatible model service; a bilingual subtitle player and exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 parents  commit 644ba89

974 files changed

Lines changed: 298467 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Copyright (C) 2026 LectureFlow contributors. Licensed under the GNU AGPL v3 or later; see LICENSE.
3+
#
4+
# Continuous integration (SPEC-v3 V10): on every push and pull request, on
5+
# Windows x64 and macOS arm64: Go vet and tests, the Python worker tests,
6+
# the desktop shell's unit tests and the licence audit. Every action is
7+
# pinned to a commit.
8+
#
9+
# Python: the worker tests run against worker/requirements.txt (CPU wheels
10+
# of faster-whisper, pypdf, pytest). A smaller set (pytest, numpy, pypdf)
11+
# is not enough: the checkpoint tests import faster_whisper's own speech
12+
# timestamp helper. No model is downloaded; tests that need a GPU, OpenVINO
13+
# or MLX models are marked and skipped (worker/conftest.py).
14+
#
15+
# ffmpeg for Windows is built from pinned sources on Linux
16+
# (desktop/scripts/build-ffmpeg-windows.sh, cached by the hash of the script
17+
# and of desktop/packaging/third-party.json); the Windows tests run the Go
18+
# tests that need a real ffmpeg against that build.
19+
name: CI
20+
21+
on:
22+
push:
23+
pull_request:
24+
# Run it by hand from the Actions tab when a push did not start it.
25+
workflow_dispatch:
26+
27+
permissions:
28+
contents: read
29+
30+
jobs:
31+
ffmpeg-windows:
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35+
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
36+
id: cache
37+
with:
38+
path: desktop/.cache/ffmpeg-windows-*
39+
key: ffmpeg-windows-${{ hashFiles('desktop/scripts/build-ffmpeg-windows.sh', 'desktop/packaging/third-party.json') }}
40+
- name: Build the LGPL ffmpeg for Windows (mingw-w64)
41+
if: steps.cache.outputs.cache-hit != 'true'
42+
# The build runs as root: drop its work and download directories,
43+
# which the ffmpeg-windows-* patterns below would also match, and
44+
# hand the output to the runner user for the cache and the upload.
45+
run: |
46+
sudo bash desktop/scripts/build-ffmpeg-windows.sh --install-deps
47+
sudo rm -rf desktop/.cache/ffmpeg-windows-work desktop/.cache/ffmpeg-windows-downloads
48+
sudo chown -R "$(id -u):$(id -g)" desktop/.cache
49+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
50+
with:
51+
name: ffmpeg-windows
52+
path: desktop/.cache/ffmpeg-windows-*/
53+
if-no-files-found: error
54+
# The build is under desktop/.cache, which upload-artifact skips
55+
# as a hidden directory unless told otherwise.
56+
include-hidden-files: true
57+
58+
test:
59+
needs: ffmpeg-windows
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os: [windows-latest, macos-14]
64+
runs-on: ${{ matrix.os }}
65+
steps:
66+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
67+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
68+
with:
69+
go-version-file: go.mod
70+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
71+
with:
72+
python-version: "3.13"
73+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
74+
with:
75+
node-version: "24.21.0"
76+
cache: npm
77+
cache-dependency-path: desktop/package-lock.json
78+
79+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
80+
if: runner.os == 'Windows'
81+
with:
82+
name: ffmpeg-windows
83+
path: desktop/.cache/
84+
- name: Use the LGPL ffmpeg build
85+
if: runner.os == 'Windows'
86+
shell: bash
87+
run: |
88+
bin=$(ls -d "$PWD"/desktop/.cache/ffmpeg-windows-*/bin)
89+
cygpath -w "$bin" >> "$GITHUB_PATH"
90+
91+
- name: Go vet
92+
run: go vet ./...
93+
- name: Go tests
94+
run: go test -p 4 ./...
95+
- name: Go build for macOS arm64
96+
if: runner.os == 'macOS'
97+
env:
98+
GOOS: darwin
99+
GOARCH: arm64
100+
CGO_ENABLED: "0"
101+
run: go build -trimpath -o lectureflow ./cmd/lectureflow
102+
103+
- name: Python dependencies
104+
run: python -m pip install -r worker/requirements.txt
105+
- name: Python worker tests
106+
run: python -m pytest -q worker
107+
108+
- name: Desktop dependencies
109+
working-directory: desktop
110+
run: npm ci
111+
- name: Desktop unit tests
112+
working-directory: desktop
113+
run: npm test
114+
115+
- name: Licence audit (dependencies and SPDX headers)
116+
if: runner.os == 'Windows'
117+
run: go run ./scripts/licaudit -check

‎.github/workflows/cla.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Copyright (C) 2026 LectureFlow contributors. Licensed under the GNU AGPL v3 or later; see LICENSE.
3+
#
4+
# CLA check (SPEC-v3 V7, CONTRIBUTING.md). Uses CLA Assistant Lite, pinned to
5+
# the commit of release v2.6.1.
6+
#
7+
# Signature storage: signatures/version1/cla.json on the branch
8+
# "cla-signatures" of this repository, committed by the action with
9+
# GITHUB_TOKEN. Create that branch once (e.g. an orphan branch) before the
10+
# first external pull request, and keep it writable by GitHub Actions; the
11+
# main branch history is never touched. No personal access token is needed
12+
# because the signatures stay in this repository.
13+
#
14+
# pull_request_target runs in the context of the base repository; this job
15+
# never checks out or runs the pull request's code.
16+
name: CLA
17+
18+
on:
19+
issue_comment:
20+
types: [created]
21+
pull_request_target:
22+
types: [opened, closed, synchronize]
23+
24+
permissions:
25+
actions: write
26+
contents: write
27+
pull-requests: write
28+
statuses: write
29+
30+
jobs:
31+
cla:
32+
runs-on: ubuntu-latest
33+
if: >-
34+
github.event_name == 'pull_request_target' ||
35+
(github.event.issue.pull_request &&
36+
(github.event.comment.body == 'recheck' ||
37+
github.event.comment.body == 'I have read the LectureFlow CLA Document and I hereby sign the CLA'))
38+
steps:
39+
- name: CLA Assistant Lite
40+
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
path-to-signatures: signatures/version1/cla.json
45+
path-to-document: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.repository.default_branch }}/CLA.md
46+
branch: cla-signatures
47+
allowlist: dependabot[bot],github-actions[bot]
48+
custom-pr-sign-comment: I have read the LectureFlow CLA Document and I hereby sign the CLA
49+
custom-notsigned-prcomment: >-
50+
Thank you for your contribution. Before it can be merged, please read the
51+
LectureFlow Contributor License Agreement (CLA.md) and sign it by replying
52+
to this pull request with the sentence below. / 感谢你的贡献。合并之前,请阅读
53+
CLA.md 中的贡献者许可协议,并在本 PR 中回复下面这句话完成签署。
54+
custom-allsigned-prcomment: All contributors have signed the LectureFlow CLA. / 所有贡献者均已签署 CLA。
55+
lock-pullrequest-aftermerge: true

‎.github/workflows/license.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Copyright (C) 2026 LectureFlow contributors. Licensed under the GNU AGPL v3 or later; see LICENSE.
3+
#
4+
# License audit (SPEC-v3 V7, V10): dependency licenses must be compatible
5+
# with AGPL-3.0, every tracked source file needs its SPDX header. Offline
6+
# apart from downloading the Go modules. THIRD_PARTY_NOTICES.md is
7+
# regenerated by the release build (make.ps1 audit), not here.
8+
name: License audit
9+
10+
on:
11+
push:
12+
pull_request:
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
audit:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
23+
with:
24+
go-version-file: go.mod
25+
- name: Download Go modules
26+
run: go mod download
27+
- name: Dependency license audit
28+
run: go run ./scripts/licaudit -check -only deps
29+
- name: SPDX headers
30+
if: ${{ !cancelled() }}
31+
run: go run ./scripts/licaudit -check -only spdx

‎.github/workflows/release.yml‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Copyright (C) 2026 LectureFlow contributors. Licensed under the GNU AGPL v3 or later; see LICENSE.
3+
#
4+
# Release build (SPEC-v3 V8–V10): on a version tag, build the installers on
5+
# Windows (NSIS + portable) and macOS arm64 (dmg + zip for updates), smoke
6+
# test them, and create a DRAFT GitHub Release with the installers,
7+
# blockmaps and the size reports. Nothing is published automatically. Every
8+
# action is pinned to a commit.
9+
#
10+
# Updates (V8): only when the repository variable LECTUREFLOW_UPDATE_REPO
11+
# ("owner/name") is set does the build contain an update feed
12+
# (app-update.yml) and produce update metadata (latest*.yml, uploaded with
13+
# the release). Without it the apps never check for updates.
14+
# LECTUREFLOW_PUBLISHER_NAME (variable, optional): Windows publisher name that
15+
# updates must be signed by (signed builds; default: the certificate's CN).
16+
#
17+
# ffmpeg for Windows is built from pinned sources on Linux first
18+
# (desktop/scripts/build-ffmpeg-windows.sh) and handed to the Windows job.
19+
#
20+
# Signing (V9) comes from repository secrets; when they are not set, the
21+
# build is unsigned and still succeeds (see docs/install.md):
22+
# Windows: WIN_CSC_LINK (base64 .pfx), WIN_CSC_KEY_PASSWORD
23+
# macOS: MAC_CSC_LINK (base64 .p12), MAC_CSC_KEY_PASSWORD,
24+
# APPLE_API_KEY (path written from APPLE_API_KEY_P8), APPLE_API_KEY_ID, APPLE_API_ISSUER
25+
name: Release
26+
27+
on:
28+
push:
29+
tags: ["v*"]
30+
31+
permissions:
32+
contents: read
33+
34+
jobs:
35+
ffmpeg-windows:
36+
runs-on: ubuntu-24.04
37+
steps:
38+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39+
- name: Build the LGPL ffmpeg for Windows (mingw-w64)
40+
# The build runs as root: drop its work and download directories,
41+
# which the ffmpeg-windows-* patterns below would also match, and
42+
# hand the output to the runner user for the cache and the upload.
43+
run: |
44+
sudo bash desktop/scripts/build-ffmpeg-windows.sh --install-deps
45+
sudo rm -rf desktop/.cache/ffmpeg-windows-work desktop/.cache/ffmpeg-windows-downloads
46+
sudo chown -R "$(id -u):$(id -g)" desktop/.cache
47+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
48+
with:
49+
name: ffmpeg-windows
50+
path: desktop/.cache/ffmpeg-windows-*/
51+
if-no-files-found: error
52+
# The build is under desktop/.cache, which upload-artifact skips
53+
# as a hidden directory unless told otherwise.
54+
include-hidden-files: true
55+
56+
build:
57+
needs: ffmpeg-windows
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
os: [windows-latest, macos-14]
62+
runs-on: ${{ matrix.os }}
63+
steps:
64+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
65+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
66+
with:
67+
go-version-file: go.mod
68+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
69+
with:
70+
node-version: "24.21.0"
71+
cache: npm
72+
cache-dependency-path: desktop/package-lock.json
73+
74+
- name: Tag matches the app version
75+
shell: bash
76+
run: |
77+
v=$(node -p "require('./desktop/package.json').version")
78+
test "${GITHUB_REF_NAME}" = "v${v}" || { echo "tag ${GITHUB_REF_NAME} does not match desktop/package.json ${v}"; exit 1; }
79+
80+
- name: Desktop dependencies
81+
working-directory: desktop
82+
run: npm ci
83+
84+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
85+
if: runner.os == 'Windows'
86+
with:
87+
name: ffmpeg-windows
88+
path: desktop/.cache/
89+
90+
- name: Apple API key file
91+
if: runner.os == 'macOS'
92+
shell: bash
93+
env:
94+
APPLE_API_KEY_P8: ${{ secrets.APPLE_API_KEY_P8 }}
95+
run: |
96+
if [ -n "$APPLE_API_KEY_P8" ]; then
97+
printf '%s' "$APPLE_API_KEY_P8" > "$RUNNER_TEMP/apple-api-key.p8"
98+
echo "APPLE_API_KEY=$RUNNER_TEMP/apple-api-key.p8" >> "$GITHUB_ENV"
99+
fi
100+
101+
- name: Build installers (ffmpeg for macOS is built from source here)
102+
working-directory: desktop
103+
env:
104+
CSC_LINK: ${{ runner.os == 'Windows' && secrets.WIN_CSC_LINK || secrets.MAC_CSC_LINK }}
105+
CSC_KEY_PASSWORD: ${{ runner.os == 'Windows' && secrets.WIN_CSC_KEY_PASSWORD || secrets.MAC_CSC_KEY_PASSWORD }}
106+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
107+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
108+
LECTUREFLOW_UPDATE_REPO: ${{ vars.LECTUREFLOW_UPDATE_REPO }}
109+
LECTUREFLOW_PUBLISHER_NAME: ${{ vars.LECTUREFLOW_PUBLISHER_NAME }}
110+
run: node scripts/dist.js --publish never
111+
112+
- name: Smoke test the packaged app
113+
working-directory: desktop
114+
env:
115+
LECTUREFLOW_UPDATE_REPO: ${{ vars.LECTUREFLOW_UPDATE_REPO }}
116+
run: node scripts/smoke.js
117+
118+
- name: Collect release files
119+
shell: bash
120+
run: |
121+
mkdir -p out
122+
cd desktop/dist
123+
for f in *.exe *.dmg *.zip *.blockmap latest*.yml; do
124+
[ -e "$f" ] && cp "$f" ../../out/
125+
done
126+
cp size-report.md "../../out/size-report-${RUNNER_OS}.md"
127+
cp size-report.json "../../out/size-report-${RUNNER_OS}.json"
128+
129+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
130+
with:
131+
name: installers-${{ runner.os }}
132+
path: out/
133+
if-no-files-found: error
134+
135+
draft-release:
136+
needs: build
137+
runs-on: ubuntu-latest
138+
permissions:
139+
contents: write
140+
steps:
141+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
142+
with:
143+
path: out
144+
merge-multiple: true
145+
- name: Create the draft release
146+
env:
147+
GH_TOKEN: ${{ github.token }}
148+
run: |
149+
cat out/size-report-*.md > notes.md
150+
gh release create "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" --draft \
151+
--title "LectureFlow ${GITHUB_REF_NAME#v}" --notes-file notes.md out/*

0 commit comments

Comments
 (0)