Add whishper back

This commit is contained in:
Ruben Hensen
2025-03-14 17:45:55 +01:00
parent 1b2879026a
commit 97badf0b21
23 changed files with 0 additions and 0 deletions
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: app-claim0
name: app-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: app-claim1
name: app-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
+61
View File
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: app
name: app
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: app
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: app
spec:
containers:
- command:
- sh
- -c
- |
# Replace the original file with a symlink to our writable version
if [ -f /Whisper-WebUI/configs/default_parameters.yaml ]; then
rm /Whisper-WebUI/configs/default_parameters.yaml
fi
cp /myconfig/default_parameters.yaml /Whisper-WebUI/configs/default_parameters.yaml
# Start the application
python app.py --server_port 7860 --server_name 0.0.0.0
image: hebury/whisper-webui:latest
name: app
ports:
- containerPort: 7860
protocol: TCP
stdin: true
tty: true
volumeMounts:
- mountPath: /Whisper-WebUI/models
name: app-claim0
- mountPath: /Whisper-WebUI/outputs
name: app-claim1
- name: config-volume
mountPath: /myconfig
restartPolicy: Always
volumes:
- name: app-claim0
persistentVolumeClaim:
claimName: app-claim0
- name: app-claim1
persistentVolumeClaim:
claimName: app-claim1
- name: config-volume
configMap:
name: whisper-webui-config
+43
View File
@@ -0,0 +1,43 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whisper-webui-ingress
annotations:
# nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
nginx.ingress.kubernetes.io/enable-cors: "true"
# type of authentication
# nginx.ingress.kubernetes.io/auth-type: basic
# name of the secret that contains the user/password definitions
# nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth
# message to display with an appropriate context why the authentication is required
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
nginx.ingress.kubernetes.io/proxy-body-size: "0"
# nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/"
# nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE"
# If you encounter a redirect loop or are getting a 307 response code
# then you need to force the nginx ingress to connect to the backend using HTTPS.
#
# nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# namespace: ente-photos
spec:
ingressClassName: nginx
rules:
- host: alv.hensen.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 7860
# TLS configuration for HTTPS
tls:
# TLS secretName used on ClusterIssuer
- secretName: letsencrypt-prod
hosts:
- alv.hensen.io
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: app
name: app
spec:
ports:
- name: "7860"
port: 7860
targetPort: 7860
selector:
io.kompose.service: app
+29
View File
@@ -0,0 +1,29 @@
# services:
# app:
# build: .
# image: jhj0517/whisper-webui:latest
# volumes:
# # You can mount the container's volume paths to directory paths on your local machine.
# # Models will be stored in the `./models' directory on your machine.
# # Similarly, all output files will be stored in the `./outputs` directory.
# - ./models:/Whisper-WebUI/models
# - ./outputs:/Whisper-WebUI/outputs
# ports:
# - "7860:7860"
# stdin_open: true
# tty: true
# entrypoint: ["python", "app.py", "--server_port", "7860", "--server_name", "0.0.0.0",]
# # If you're not using nvidia GPU, Update device to match yours.
# # See more info at : https://docs.docker.com/compose/compose-file/deploy/#driver
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [ gpu ]
+73
View File
@@ -0,0 +1,73 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: whisper-webui-config
data:
default_parameters.yaml: |
whisper:
model_size: "large-v3"
file_format: "SRT"
lang: "dutch"
is_translate: false
beam_size: 5
log_prob_threshold: -0.8
no_speech_threshold: 0.7
best_of: 5
patience: 1
condition_on_previous_text: true
prompt_reset_on_temperature: 0.5
initial_prompt: "Dit is een zakelijke algemene leden vergadering in het Nederlands op studentenroeivereniging Phocas."
temperature: 0
compression_ratio_threshold: 2.0
chunk_length: 30
batch_size: 24
length_penalty: 1
repetition_penalty: 1.2
no_repeat_ngram_size: 3
prefix: null
suppress_blank: true
suppress_tokens: "[-1]"
max_initial_timestamp: 1
word_timestamps: true
prepend_punctuations: "\"'“¿([{-"
append_punctuations: "\"'.。,!?::”)]}、"
max_new_tokens: null
hallucination_silence_threshold: 0.2
hotwords: null
language_detection_threshold: 0.8
language_detection_segments: 2
add_timestamp: true
enable_offload: true
vad:
vad_filter: true
threshold: 0.6
min_speech_duration_ms: 250
max_speech_duration_s: 9999
min_silence_duration_ms: 1000
speech_pad_ms: 2000
diarization:
is_diarize: false
hf_token: ""
enable_offload: true
bgm_separation:
is_separate_bgm: false
uvr_model_size: "UVR-MDX-NET-Inst_HQ_4"
segment_size: 256
save_file: false
enable_offload: true
translation:
deepl:
api_key: ""
is_pro: false
source_lang: "Automatic Detection"
target_lang: "English"
nllb:
model_size: "facebook/nllb-200-1.3B"
source_lang: null
target_lang: null
max_length: 200
add_timestamp: false