Compare commits

..

15 Commits

Author SHA1 Message Date
Coder
0e4f1c0f50 Upgrade pip in GPU image build 2026-09-02 18:01:17 +07:00
Coder
a0d076ee61 Pin Cython for PyAV 10 build 2026-09-02 17:14:28 +07:00
Coder
ce506eeeba Install PyAV build dependencies in GPU image 2026-09-02 17:03:34 +07:00
Coder
719f2f7c98 Fix pnpm installation in Docker builds 2026-09-02 16:48:15 +07:00
Coder
33d74cded0 Update YouTube support and add Gitea GPU build 2026-09-02 16:41:54 +07:00
pluja
adcd186a2c Update docs domain 2025-08-15 21:19:01 +03:00
pluja
8f031c8cfa Merge pull request #131 from danielcamposramos/patch-9
Update Dockerfile
2025-01-27 09:25:25 +01:00
Daniel Ramos
869d34246b Update Dockerfile
Changed the golang-upx package version to the latest working version;
Changed the DEBIAN_FRONTEND variable to be right;
2025-01-26 22:09:19 -03:00
pluja
5fe8e483f6 Merge branch 'main' of github.com:pluja/whishper 2024-03-06 20:33:07 +01:00
pluja
b6e4dea9c3 add v4 notice 2024-03-06 20:24:21 +01:00
pluja
132a7b392e Merge pull request #73 from FTCHD/add-res-data
Return Transcription JSON on `handlePostTranscription`
2024-02-10 10:46:12 +01:00
pluja
41b5dbdf85 Fix #81 2024-01-30 19:35:03 +01:00
pluja
45ff8ec877 Merge pull request #75 from miketwo/miketwo-update-readme
Update README.md
2024-01-08 06:19:51 +01:00
Michael
e7a57e49cc Update README.md
Fix URL
2024-01-07 22:30:17 -06:00
FTCHD
543ecf534b Return Transcription JSON on handlePostTranscription 2024-01-05 16:17:07 +02:00
10 changed files with 117 additions and 32 deletions

View File

@@ -0,0 +1,31 @@
name: Build and publish GPU image
on:
workflow_dispatch:
jobs:
build-gpu:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.byte-mate.ru
username: Coder
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and publish linux/amd64 GPU image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.gpu
platforms: linux/amd64
push: true
tags: |
git.byte-mate.ru/coder/whishper-gpu:latest

View File

@@ -1,9 +1,17 @@
ARG DENO_VERSION=2.9.5
ARG YT_DLP_VERSION=2026.08.19
FROM denoland/deno:bin-${DENO_VERSION} AS deno_cache
# YT-DLP Download and setup # YT-DLP Download and setup
FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
ARG YT_DLP_VERSION
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
RUN apt update && apt install -y wget RUN apt update && apt install -y wget
RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp RUN wget "https://github.com/yt-dlp/yt-dlp/releases/download/${YT_DLP_VERSION}/yt-dlp" -O /usr/local/bin/yt-dlp \
&& echo "${YT_DLP_SHA256} /usr/local/bin/yt-dlp" | sha256sum -c -
RUN chmod a+rx /usr/local/bin/yt-dlp RUN chmod a+rx /usr/local/bin/yt-dlp
# Backend setup # Backend setup
@@ -21,7 +29,7 @@ RUN chmod a+rx whishper
FROM node:alpine as frontend FROM node:alpine as frontend
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY ./frontend /app COPY ./frontend /app
WORKDIR /app WORKDIR /app
@@ -58,6 +66,7 @@ COPY --from=frontend-prod-deps /app/node_modules /app/frontend/node_modules
COPY --from=backend-builder /app/whishper /bin/whishper COPY --from=backend-builder /app/whishper /bin/whishper
RUN chmod a+rx /bin/whishper RUN chmod a+rx /bin/whishper
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
COPY --from=deno_cache /deno /bin/deno
# Nginx setup # Nginx setup
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf

View File

@@ -1,15 +1,23 @@
ARG DENO_VERSION=2.9.5
ARG YT_DLP_VERSION=2026.08.19
FROM denoland/deno:bin-${DENO_VERSION} AS deno_cache
# YT-DLP Download and setup # YT-DLP Download and setup
FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
ARG YT_DLP_VERSION
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
RUN apt update && apt install -y wget RUN apt update && apt install -y wget
RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp RUN wget "https://github.com/yt-dlp/yt-dlp/releases/download/${YT_DLP_VERSION}/yt-dlp" -O /usr/local/bin/yt-dlp \
&& echo "${YT_DLP_SHA256} /usr/local/bin/yt-dlp" | sha256sum -c -
RUN chmod a+rx /usr/local/bin/yt-dlp RUN chmod a+rx /usr/local/bin/yt-dlp
# Backend setup # Backend setup
FROM devopsworks/golang-upx:latest as backend-builder FROM devopsworks/golang-upx:latest AS backend-builder
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app WORKDIR /app
COPY ./backend /app COPY ./backend /app
RUN go mod tidy RUN go mod tidy
@@ -18,10 +26,10 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o whishper . && \
RUN chmod a+rx whishper RUN chmod a+rx whishper
# Frontend setup # Frontend setup
FROM node:alpine as frontend FROM node:alpine AS frontend
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY ./frontend /app COPY ./frontend /app
WORKDIR /app WORKDIR /app
@@ -34,7 +42,7 @@ ENV BODY_SIZE_LIMIT=0
RUN pnpm run build RUN pnpm run build
# Base container # Base container
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 as base FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS base
ENV PYTHON_VERSION=3.10 ENV PYTHON_VERSION=3.10
@@ -44,9 +52,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \
python${PYTHON_VERSION} \ python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \ python${PYTHON_VERSION}-venv \
python3-pip \ python3-pip \
python${PYTHON_VERSION}-dev \
build-essential \
pkg-config \
ffmpeg \ ffmpeg \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev \
curl wget xz-utils \ curl wget xz-utils \
ffmpeg nginx supervisor \ nginx supervisor \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \ RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
@@ -56,7 +74,9 @@ RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
# Python service setup # Python service setup
COPY ./transcription-api /app/transcription COPY ./transcription-api /app/transcription
WORKDIR /app/transcription WORKDIR /app/transcription
RUN pip install -r requirements.txt && \ RUN python -m pip install --upgrade pip setuptools wheel "Cython<3" && \
pip install "av==10.0.0" --no-build-isolation && \
pip install -r requirements.txt && \
pip install python-multipart && \ pip install python-multipart && \
pip3 install torch --index-url https://download.pytorch.org/whl/cu118 pip3 install torch --index-url https://download.pytorch.org/whl/cu118
@@ -76,6 +96,7 @@ COPY --from=frontend-prod-deps /app/node_modules /app/frontend/node_modules
COPY --from=backend-builder /app/whishper /bin/whishper COPY --from=backend-builder /app/whishper /bin/whishper
RUN chmod a+rx /bin/whishper RUN chmod a+rx /bin/whishper
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
COPY --from=deno_cache /deno /bin/deno
# Nginx setup # Nginx setup
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf

View File

@@ -1,10 +1,12 @@
[![whishper banner](misc/banner.png)](https://whishper.net) [![whishper banner](misc/banner.png)](https://whishper-docs.pages.dev/)
[![](https://img.shields.io/badge/website-066da5?style=for-the-badge&logo=icloud&logoColor=white)](https://whishper.net) [![](https://img.shields.io/badge/website-066da5?style=for-the-badge&logo=icloud&logoColor=white)](https://whishper-docs.pages.dev)
[![](https://img.shields.io/badge/self%20host%20guide-066da5?style=for-the-badge&logo=googledocs&logoColor=white)](https://whishper.net/guides/install) [![](https://img.shields.io/badge/self%20host%20guide-066da5?style=for-the-badge&logo=googledocs&logoColor=white)](https://whishper-docs.pages.dev/guides/install)
[![](https://img.shields.io/badge/screenshots-5c1f87?style=for-the-badge&logo=slickpic&logoColor=white)](#screenshots) [![](https://img.shields.io/badge/screenshots-5c1f87?style=for-the-badge&logo=slickpic&logoColor=white)](#screenshots)
[![](https://img.shields.io/docker/pulls/pluja/whishper?style=for-the-badge&logo=docker&logoColor=white)](https://hub.docker.com/r/pluja/whishper) [![](https://img.shields.io/docker/pulls/pluja/whishper?style=for-the-badge&logo=docker&logoColor=white)](https://hub.docker.com/r/pluja/whishper)
## 🚧 I am working on a complete rewrite of the project. Progress on this can be seen at [v4 branch](https://github.com/pluja/whishper/tree/v4). Consequently, this branch will not receive any new releases or updates.
**Whishper** is an open-source, 100% local audio transcription and subtitling suite with a full-featured web UI. **Whishper** is an open-source, 100% local audio transcription and subtitling suite with a full-featured web UI.
## Features ## Features
@@ -26,6 +28,8 @@
- [x] 🔥 **GPU support**: use your NVIDIA GPU to get even faster transcription times! - [x] 🔥 **GPU support**: use your NVIDIA GPU to get even faster transcription times!
- [x] 🐎 **CPU support**: no GPU? No problem! Whishper can run on CPU too. - [x] 🐎 **CPU support**: no GPU? No problem! Whishper can run on CPU too.
The Docker images pin `yt-dlp` to `2026.08.19` and include Deno `2.9.5`, which yt-dlp uses to solve YouTube JavaScript challenges. Both versions can be overridden at build time with the `YT_DLP_VERSION` and `DENO_VERSION` build arguments (update `YT_DLP_SHA256` when changing yt-dlp).
### Roadmap ### Roadmap
- [ ] Local folder as media input ([#15](https://github.com/pluja/whishper/issues/15)). - [ ] Local folder as media input ([#15](https://github.com/pluja/whishper/issues/15)).
@@ -54,16 +58,16 @@ Contributions are welcome! Feel free to open a PR with your changes, or take a l
### Development setup ### Development setup
Check out the development documentation [here](https://whishper.net/guides/development/). Check out the development documentation [here](https://whishper-docs.pages.dev/guides/develop/).
## Screenshots ## Screenshots
These screenshots are available on [the official website](https://whishper.net/usage/transcriptions/), click any of the following links to see: These screenshots are available on [the official website](https://whishper-docs.pages.dev/usage/transcriptions/), click any of the following links to see:
- [A transcription creation](https://whishper.net/usage/transcriptions/) - [A transcription creation](https://whishper-docs.pages.dev/usage/transcriptions/)
- [A transcription translation](https://whishper.net/usage/translate/) - [A transcription translation](https://whishper-docs.pages.dev/usage/translate/)
- [A transcription download](https://whishper.net/usage/download/) - [A transcription download](https://whishper-docs.pages.dev/usage/download/)
- [The subtitle editor](https://whishper.net/usage/editor/) - [The subtitle editor](https://whishper-docs.pages.dev/usage/editor/)
## Support ## Support

View File

@@ -1,12 +1,20 @@
ARG DENO_VERSION=2.9.5
ARG YT_DLP_VERSION=2026.08.19
FROM denoland/deno:bin-${DENO_VERSION} AS deno_cache
FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
ARG YT_DLP_VERSION
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
RUN apt update && apt install -y wget RUN apt update && apt install -y wget
RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp RUN wget "https://github.com/yt-dlp/yt-dlp/releases/download/${YT_DLP_VERSION}/yt-dlp" -O /usr/local/bin/yt-dlp \
&& echo "${YT_DLP_SHA256} /usr/local/bin/yt-dlp" | sha256sum -c -
RUN chmod a+rx /usr/local/bin/yt-dlp RUN chmod a+rx /usr/local/bin/yt-dlp
FROM devopsworks/golang-upx:latest as builder FROM devopsworks/golang-upx:1.23 as builder
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN go mod tidy RUN go mod tidy
@@ -23,8 +31,9 @@ WORKDIR /app
COPY --from=builder /app/whishper ./whishper COPY --from=builder /app/whishper ./whishper
RUN chmod a+rx ./whishper RUN chmod a+rx ./whishper
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
COPY --from=deno_cache /deno /bin/deno
RUN mkdir /app/uploads RUN mkdir /app/uploads
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT [ "/app/whishper", "-addr", ":8080" ] ENTRYPOINT [ "/app/whishper", "-addr", ":8080" ]

View File

@@ -101,9 +101,20 @@ func (s *Server) handlePostTranscription(c *fiber.Ctx) error {
return fiber.NewError(fiber.StatusInternalServerError, "Internal server error") return fiber.NewError(fiber.StatusInternalServerError, "Internal server error")
} }
// Write the JSON to the response body. // Broadcast transcription to websocket clients
s.BroadcastTranscription(res) s.BroadcastTranscription(res)
s.NewTranscriptionCh <- true s.NewTranscriptionCh <- true
// Convert the transcription to JSON.
json, err := json.Marshal(res)
if err != nil {
// 503 On vacation!
return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")
}
// Write the JSON to the response body.
c.Set("Content-Type", "application/json")
c.Write(json)
return nil return nil
} }

View File

@@ -8,7 +8,7 @@ require (
github.com/gofiber/fiber/v2 v2.50.0 github.com/gofiber/fiber/v2 v2.50.0
github.com/rs/zerolog v1.30.0 github.com/rs/zerolog v1.30.0
github.com/snakesel/libretranslate v0.0.2 github.com/snakesel/libretranslate v0.0.2
github.com/wader/goutubedl v0.0.0-20230817095831-89e825670ccd github.com/wader/goutubedl v0.0.0-20260820181547-08cab29d2129
go.mongodb.org/mongo-driver v1.12.1 go.mongodb.org/mongo-driver v1.12.1
) )

View File

@@ -53,8 +53,8 @@ github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e
github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA=
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/wader/goutubedl v0.0.0-20230817095831-89e825670ccd h1:XPyQDsvxm+Kawdk41tpvODAEcm24h9vVR/aZTI0tGAk= github.com/wader/goutubedl v0.0.0-20260820181547-08cab29d2129 h1:EgoBHZNnX13+Ig3pp0CZWKkarqDs0iHMn+smvrXYRf8=
github.com/wader/goutubedl v0.0.0-20230817095831-89e825670ccd/go.mod h1:5KXd5tImdbmz4JoVhePtbIokCwAfEhUVVx3WLHmjYuw= github.com/wader/goutubedl v0.0.0-20260820181547-08cab29d2129/go.mod h1:5KXd5tImdbmz4JoVhePtbIokCwAfEhUVVx3WLHmjYuw=
github.com/wader/osleaktest v0.0.0-20191111175233-f643b0fed071 h1:QkrG4Zr5OVFuC9aaMPmFI0ibfhBZlAgtzDYWfu7tqQk= github.com/wader/osleaktest v0.0.0-20191111175233-f643b0fed071 h1:QkrG4Zr5OVFuC9aaMPmFI0ibfhBZlAgtzDYWfu7tqQk=
github.com/wader/osleaktest v0.0.0-20191111175233-f643b0fed071/go.mod h1:XD6emOFPHVzb0+qQpiNOdPL2XZ0SRUM0N5JHuq6OmXo= github.com/wader/osleaktest v0.0.0-20191111175233-f643b0fed071/go.mod h1:XD6emOFPHVzb0+qQpiNOdPL2XZ0SRUM0N5JHuq6OmXo=
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=

View File

@@ -1,7 +1,7 @@
FROM node:alpine as base FROM node:alpine as base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable RUN npm install --global pnpm@8.15.9
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app

View File

@@ -102,13 +102,13 @@ export const downloadVTT = function (jsonData, title) {
jsonData.forEach((segment, index) => { jsonData.forEach((segment, index) => {
let startSeconds = Math.floor(segment.start); let startSeconds = Math.floor(segment.start);
let startMillis = Math.floor((segment.start - startSeconds) * 1000); let startMillis = Math.floor((segment.start - startSeconds) * 1000);
let start = new Date(startSeconds * 1000 + startMillis).toISOString().substr(11, 12).replace('.', ','); let start = new Date(startSeconds * 1000 + startMillis).toISOString().substr(11, 12);
let endSeconds = Math.floor(segment.end); let endSeconds = Math.floor(segment.end);
let endMillis = Math.floor((segment.end - endSeconds) * 1000); let endMillis = Math.floor((segment.end - endSeconds) * 1000);
let end = new Date(endSeconds * 1000 + endMillis).toISOString().substr(11, 12).replace('.', ','); let end = new Date(endSeconds * 1000 + endMillis).toISOString().substr(11, 12);
vttContent += `${index + 1}\n${start} --> ${end}\n- ${segment.text}\n\n`; vttContent += `${index + 1}\n${start} --> ${end}\n${segment.text}\n\n`;
}); });
let vttBlob = new Blob([vttContent], {type: 'text/plain'}); let vttBlob = new Blob([vttContent], {type: 'text/plain'});
@@ -118,4 +118,4 @@ export const downloadVTT = function (jsonData, title) {
link.download = `${title}.vtt`; link.download = `${title}.vtt`;
link.click(); link.click();
} }