Compare commits
11 Commits
ab243c9a00
...
33d74cded0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33d74cded0 | ||
|
|
adcd186a2c | ||
|
|
8f031c8cfa | ||
|
|
869d34246b | ||
|
|
5fe8e483f6 | ||
|
|
b6e4dea9c3 | ||
|
|
132a7b392e | ||
|
|
41b5dbdf85 | ||
|
|
45ff8ec877 | ||
|
|
e7a57e49cc | ||
|
|
543ecf534b |
31
.gitea/workflows/build-gpu.yml
Normal file
31
.gitea/workflows/build-gpu.yml
Normal 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
|
||||
11
Dockerfile
11
Dockerfile
@@ -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
|
||||
FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG YT_DLP_VERSION
|
||||
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
|
||||
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
|
||||
|
||||
# Backend setup
|
||||
@@ -58,6 +66,7 @@ COPY --from=frontend-prod-deps /app/node_modules /app/frontend/node_modules
|
||||
COPY --from=backend-builder /app/whishper /bin/whishper
|
||||
RUN chmod a+rx /bin/whishper
|
||||
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
|
||||
COPY --from=deno_cache /deno /bin/deno
|
||||
|
||||
# Nginx setup
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
@@ -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
|
||||
FROM --platform=$BUILDPLATFORM golang:bookworm AS ytdlp_cache
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG YT_DLP_VERSION
|
||||
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
|
||||
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
|
||||
|
||||
# Backend setup
|
||||
@@ -76,6 +84,7 @@ COPY --from=frontend-prod-deps /app/node_modules /app/frontend/node_modules
|
||||
COPY --from=backend-builder /app/whishper /bin/whishper
|
||||
RUN chmod a+rx /bin/whishper
|
||||
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
|
||||
COPY --from=deno_cache /deno /bin/deno
|
||||
|
||||
# Nginx setup
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
22
README.md
22
README.md
@@ -1,10 +1,12 @@
|
||||
[](https://whishper.net)
|
||||
[](https://whishper-docs.pages.dev/)
|
||||
|
||||
[](https://whishper.net)
|
||||
[](https://whishper.net/guides/install)
|
||||
[](https://whishper-docs.pages.dev)
|
||||
[](https://whishper-docs.pages.dev/guides/install)
|
||||
[](#screenshots)
|
||||
[](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.
|
||||
|
||||
## Features
|
||||
@@ -26,6 +28,8 @@
|
||||
- [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.
|
||||
|
||||
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
|
||||
|
||||
- [ ] 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
|
||||
|
||||
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
|
||||
|
||||
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 translation](https://whishper.net/usage/translate/)
|
||||
- [A transcription download](https://whishper.net/usage/download/)
|
||||
- [The subtitle editor](https://whishper.net/usage/editor/)
|
||||
- [A transcription creation](https://whishper-docs.pages.dev/usage/transcriptions/)
|
||||
- [A transcription translation](https://whishper-docs.pages.dev/usage/translate/)
|
||||
- [A transcription download](https://whishper-docs.pages.dev/usage/download/)
|
||||
- [The subtitle editor](https://whishper-docs.pages.dev/usage/editor/)
|
||||
|
||||
## Support
|
||||
|
||||
|
||||
@@ -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
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG YT_DLP_VERSION
|
||||
ARG YT_DLP_SHA256=1fa6733c37ea6fb51c99ad8fe785e7b7e5f3246c9b980230329d4fb72ed8d4d6
|
||||
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
|
||||
|
||||
FROM devopsworks/golang-upx:latest as builder
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
FROM devopsworks/golang-upx:1.23 as builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN go mod tidy
|
||||
@@ -23,8 +31,9 @@ WORKDIR /app
|
||||
COPY --from=builder /app/whishper ./whishper
|
||||
RUN chmod a+rx ./whishper
|
||||
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
|
||||
COPY --from=deno_cache /deno /bin/deno
|
||||
|
||||
RUN mkdir /app/uploads
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT [ "/app/whishper", "-addr", ":8080" ]
|
||||
ENTRYPOINT [ "/app/whishper", "-addr", ":8080" ]
|
||||
|
||||
@@ -101,9 +101,20 @@ func (s *Server) handlePostTranscription(c *fiber.Ctx) 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.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
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ require (
|
||||
github.com/gofiber/fiber/v2 v2.50.0
|
||||
github.com/rs/zerolog v1.30.0
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
@@ -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/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
|
||||
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-20230817095831-89e825670ccd/go.mod h1:5KXd5tImdbmz4JoVhePtbIokCwAfEhUVVx3WLHmjYuw=
|
||||
github.com/wader/goutubedl v0.0.0-20260820181547-08cab29d2129 h1:EgoBHZNnX13+Ig3pp0CZWKkarqDs0iHMn+smvrXYRf8=
|
||||
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/go.mod h1:XD6emOFPHVzb0+qQpiNOdPL2XZ0SRUM0N5JHuq6OmXo=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
||||
|
||||
@@ -102,13 +102,13 @@ export const downloadVTT = function (jsonData, title) {
|
||||
jsonData.forEach((segment, index) => {
|
||||
let startSeconds = Math.floor(segment.start);
|
||||
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 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'});
|
||||
@@ -118,4 +118,4 @@ export const downloadVTT = function (jsonData, title) {
|
||||
link.download = `${title}.vtt`;
|
||||
link.click();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user