Skip to content

Commit e95e485

Browse files
author
Security Level 5
committed
Initial commit
0 parents  commit e95e485

14 files changed

Lines changed: 1068 additions & 0 deletions

.env.example

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Secure Speech-to-Text - Configuration
2+
# Copy this file to .env and update with your settings
3+
4+
# =============================================================================
5+
# Hugging Face Token (REQUIRED for speaker diarization)
6+
# =============================================================================
7+
# Get your token at: https://huggingface.co/settings/tokens
8+
# You must also accept the model conditions at:
9+
# - https://huggingface.co/pyannote/speaker-diarization-3.1
10+
# - https://huggingface.co/pyannote/segmentation-3.0
11+
HUGGINGFACE_HUB_TOKEN=your_token_here
12+
13+
# =============================================================================
14+
# LLM API Configuration (for executive summaries)
15+
# =============================================================================
16+
# OpenAI-compatible API endpoint
17+
# Examples:
18+
# LM Studio: http://localhost:1234/v1
19+
# Ollama: http://localhost:11434/v1
20+
# vLLM: http://localhost:8000/v1
21+
API_BASE_URL=http://localhost:1234/v1
22+
23+
# API key (use any value for local servers that don't require auth)
24+
API_KEY=lm-studio
25+
26+
# Model name to use for executive summary generation
27+
# Use the model name as it appears in your local LLM server
28+
MODEL_NAME=local-model

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
*.json
2+
*.tsv
3+
recording.txt
4+
*.vtt
5+
*.pdf
6+
executive_summary.md
7+
*.srt
8+
*.wav
9+
*.zip
10+
*.txt
11+
!requirements.txt
12+
*.m4a
13+
14+
# Input/Output folders (keep folders, ignore contents)
15+
input/*
16+
!input/.gitkeep
17+
output/*
18+
!output/.gitkeep
19+
20+
# Environment configuration
21+
.env
22+
.venv

Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Secure Speech-to-Text - GPU Dockerfile (CUDA 12.8 + cuDNN)
2+
FROM nvidia/cuda:12.8.0-cudnn-runtime-ubuntu22.04
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
# Fix PyTorch 2.6+ weights_only default change (pyannote models need this)
8+
ENV TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1
9+
10+
# Install Python 3.13 and system dependencies
11+
RUN apt-get update && apt-get install -y \
12+
software-properties-common \
13+
&& add-apt-repository ppa:deadsnakes/ppa \
14+
&& apt-get update && apt-get install -y \
15+
python3.13 \
16+
python3.13-venv \
17+
python3.13-dev \
18+
python3-pip \
19+
ffmpeg \
20+
git \
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
# Set Python 3.13 as default
24+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 1 \
25+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1
26+
27+
# Bootstrap pip for Python 3.13 (distutils removed in 3.12+)
28+
RUN python -m ensurepip --upgrade \
29+
&& python -m pip install --upgrade pip
30+
31+
# Set working directory
32+
WORKDIR /app
33+
34+
# Copy requirements and install dependencies (whisperx handles PyTorch)
35+
COPY requirements.txt .
36+
RUN pip install --no-cache-dir -r requirements.txt
37+
38+
# Ensure cuDNN from pip is on the library path (needed for torch 2.8 + cuDNN 9.x)
39+
ENV LD_LIBRARY_PATH=/usr/local/lib/python3.13/dist-packages/nvidia/cudnn/lib:$LD_LIBRARY_PATH
40+
41+
# Copy application code
42+
COPY . .
43+
44+
# Create input/output directories
45+
RUN mkdir -p input output
46+
47+
# Set default command
48+
ENTRYPOINT ["python", "secure_speech_to_text.py"]
49+
CMD ["--help"]
50+

Dockerfile.cpu

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Secure Speech-to-Text - CPU Dockerfile
2+
FROM python:3.13-slim
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
# Fix PyTorch 2.6+ weights_only default change (pyannote models need this)
8+
ENV TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1
9+
10+
# Install system dependencies
11+
RUN apt-get update && apt-get install -y \
12+
ffmpeg \
13+
git \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Bootstrap pip (ensurepip needed for 3.13) and install uv (fast parallel installer)
17+
RUN python -m ensurepip --upgrade \
18+
&& python -m pip install --upgrade pip \
19+
&& python -m pip install uv
20+
21+
# Set working directory
22+
WORKDIR /app
23+
24+
# Copy requirements and install dependencies using uv (fast, parallel downloads)
25+
COPY requirements.txt .
26+
RUN --mount=type=cache,target=/root/.cache/uv \
27+
uv pip install --system --no-cache -r requirements.txt
28+
29+
# Copy application code
30+
COPY . .
31+
32+
# Create input/output directories
33+
RUN mkdir -p input output
34+
35+
# Set default command
36+
ENTRYPOINT ["python", "secure_speech_to_text.py"]
37+
CMD ["--help"]
38+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Security Level 5
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)