Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ debug_whisperx_parsing.go
debug_parsing.go
scriberr-optimized
tests/database_test.db-shm

# Project documentation (local only)
project-docs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure removing this is necessary but it doesn't hurt either

tests

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests definitely shouldn't be added to gitignore

15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@ RUN cd frontend \
FROM golang:1.24-bookworm AS go-builder
WORKDIR /src

# Pre-cache modules
# Pre-cache modules for better build caching
COPY go.mod go.sum ./
RUN go mod download

# Copy source
COPY . .

# Ensure go.sum is up-to-date if go.mod changed later in the build cache chain and download sums
RUN go mod tidy && go mod download

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer static dependencies with pinned versions, see below


# Copy built UI into embed path
RUN rm -rf internal/web/dist && mkdir -p internal/web
COPY --from=ui-builder /web/frontend/dist internal/web/dist

# Build binary (arch matches builder platform)
RUN CGO_ENABLED=0 \
go build -o /out/scriberr cmd/server/main.go
go build -mod=mod -o /out/scriberr cmd/server/main.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't really add the mod flag tbh. In my understanding having dependencies resolve dynamically increases potential for discrepancies in builds and potentially increases attack surface for supply chain attacks



########################
Expand Down Expand Up @@ -68,14 +71,6 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& chmod 755 /usr/local/bin/uv \
&& uv --version

# Install Deno (JavaScript runtime required for yt-dlp YouTube downloads)
# YouTube now requires JS execution for video cipher decryption
# See: https://github.com/yt-dlp/yt-dlp/issues/14404
RUN curl -fsSL https://deno.land/install.sh | sh \
&& cp /root/.deno/bin/deno /usr/local/bin/deno \
&& chmod 755 /usr/local/bin/deno \
&& deno --version

Comment on lines -71 to -78

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deno should be kept in, see c2d29fc

# Create default user (will be modified at runtime if needed)
RUN groupadd -g 1000 appuser \
&& useradd -m -u 1000 -g 1000 appuser \
Expand Down
8 changes: 0 additions & 8 deletions Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& chmod 755 /usr/local/bin/uv \
&& uv --version

# Install Deno (JavaScript runtime required for yt-dlp YouTube downloads)
# YouTube now requires JS execution for video cipher decryption
# See: https://github.com/yt-dlp/yt-dlp/issues/14404
RUN curl -fsSL https://deno.land/install.sh | sh \
&& cp /root/.deno/bin/deno /usr/local/bin/deno \
&& chmod 755 /usr/local/bin/deno \
&& deno --version

Comment on lines -74 to -81

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't remove, see above

# Create default user (will be modified at runtime if needed)
# Use 10001 to avoid conflicts with existing users in CUDA base image
RUN groupadd -g 10001 appuser \
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ See the full guide: https://scriberr.app/docs/diarization.html
<img alt="Diarization setup" src="screenshots/scriberr-diarization-setup.png" width="420" />
</p>

## Summarization (Ollama)

Scribber uses different models from Ollama (local, open-source and free) or OpenAi (online, propietary, paid) in order to automatically summarize the transcriptions. To connect, just go to settings and introduce either the Ollama port or the OpenAI API.
A common error is that if Ollama has been installed through Docker, rather then connecting via "http://localhost:11434" you sohuld instead connect through "http://host.docker.internal:11434" (change the port to whichever you have used, automatically uses that one). That way Scriberr directly connects to the Docker, avoiding a "Failed to fetch model" error and alike.

Comment on lines -193 to -197

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this please

## API

Scriberr exposes a clean REST API for most features (transcription, chat, notes, summaries, admin, and more). Authentication supports JWT or API keys depending on endpoint.
Expand Down
31 changes: 1 addition & 30 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

"syscall"
"time"

Expand All @@ -17,11 +16,10 @@ import (
"scriberr/internal/database"
"scriberr/internal/queue"
"scriberr/internal/transcription"
"scriberr/internal/transcription/adapters"
"scriberr/internal/transcription/registry"
Comment on lines -20 to -21

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

"scriberr/pkg/logger"

_ "scriberr/api-docs" // Import generated Swagger docs
_ "scriberr/internal/transcription/adapters" // Import adapters for auto-registration

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be needed if you keep "scriberr/internal/transcription/adapters" from above

)

// Version information (set by GoReleaser)
Expand Down Expand Up @@ -75,9 +73,6 @@ func main() {
logger.Startup("config", "Loading configuration")
cfg := config.Load()

// Register adapters with config-based paths
registerAdapters(cfg)

Comment on lines -78 to -80

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep please

// Initialize database
logger.Startup("database", "Connecting to database")
if err := database.Initialize(cfg.DatabasePath); err != nil {
Expand Down Expand Up @@ -161,27 +156,3 @@ func main() {

logger.Info("Server stopped")
}

// registerAdapters registers all transcription and diarization adapters with config-based paths
func registerAdapters(cfg *config.Config) {
logger.Info("Registering adapters with environment path", "whisperx_env", cfg.WhisperXEnv)

// Shared environment path for NVIDIA models (NeMo-based)
nvidiaEnvPath := filepath.Join(cfg.WhisperXEnv, "parakeet")

// Register transcription adapters
registry.RegisterTranscriptionAdapter("whisperx",
adapters.NewWhisperXAdapter(cfg.WhisperXEnv))
registry.RegisterTranscriptionAdapter("parakeet",
adapters.NewParakeetAdapter(nvidiaEnvPath))
registry.RegisterTranscriptionAdapter("canary",
adapters.NewCanaryAdapter(nvidiaEnvPath)) // Shares with Parakeet

// Register diarization adapters
registry.RegisterDiarizationAdapter("pyannote",
adapters.NewPyAnnoteAdapter(nvidiaEnvPath)) // Shares with Parakeet
registry.RegisterDiarizationAdapter("sortformer",
adapters.NewSortformerAdapter(nvidiaEnvPath)) // Shares with Parakeet

logger.Info("Adapter registration complete")
}
Comment on lines -164 to -187

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep please for retained original functionality

1 change: 1 addition & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ services:
volumes:
- ./scriberr-data:/app/data
- ./env-data:/app/whisperx-env
- ./Transferordner:/app/Transferordner:ro

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a leftover from testing, I think you can remove this for cleanliness

restart: unless-stopped

volumes:
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/index-CTEra42u.js

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/swaggo/swag v1.16.6
golang.org/x/crypto v0.32.0
gorm.io/gorm v1.30.1
gorm.io/driver/postgres v1.5.7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This driver may have a couple of CVE's: kube-tarian/kad#518
The issue seems to be an older crypto module. Is it possible to use a more up-to-date one? Or did you encounter breaking changes akin to go-gorm/gorm#7489 as well?
I didn't look into whether these may affect overall code security too deeply but in case this needs to be kept, I would like to do that first

)

require (
Expand Down
Loading