Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fasterwhisper stt #72

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions neon_diana_utils/helm_charts/backend/diana-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.25
version: 0.1.26

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -24,16 +24,16 @@ version: 0.1.25
appVersion: "1.0.1a23"

dependencies:
# nginx needs to deploy to its own namespace
# - name: ingress-nginx
# version: 4.6.0
# repository: https://kubernetes.github.io/ingress-nginx
# nginx needs to deploy to its own namespace
# - name: ingress-nginx
# version: 4.6.0
# repository: https://kubernetes.github.io/ingress-nginx
- name: rabbitmq
version: 11.13.0
repository: https://charts.bitnami.com/bitnami
- name: diana-http
version: 0.0.14
version: 0.0.15
repository: file://../http-services
- name: diana-mq
version: 0.0.17
repository: file://../mq-services
repository: file://../mq-services
8 changes: 6 additions & 2 deletions neon_diana_utils/helm_charts/backend/http-services/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: diana-http
description: Deploy DIANA HTTP Services

type: application
version: 0.0.14
version: 0.0.15
appVersion: "1.0.1a23"
dependencies:
- name: libretranslate
Expand Down Expand Up @@ -42,7 +42,11 @@ dependencies:
alias: stt-nemo
version: 0.0.2
repository: file://../../http/stt-nemo
- name: stt-fasterwhisper
alias: stt-fasterwhisper
version: 0.0.1
repository: file://../../http/stt-fasterwhisper
- name: hana
alias: endpoint-hana
version: 0.0.1
repository: file://../../http/hana
repository: file://../../http/hana
10 changes: 9 additions & 1 deletion neon_diana_utils/helm_charts/backend/http-services/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ ww-snowboy:
ingress:
enabled: False
# image.tag:
stt-fasterwhisper:
subdomain: &host_fasterwhisper fasterwhisper
servicePort: *default_port
ingress:
enabled: True

ingress:
enabled: True
Expand Down Expand Up @@ -96,4 +101,7 @@ ingress:
- host: *host_snowboy
serviceName: backend-snowboy
servicePort: *default_port
extraRules: []
- host: *host_fasterwhisper
serviceName: backend-fasterwhisper
servicePort: *default_port
extraRules: []
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/base/base-http/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: base-http
description: Library chart for basic HTTP Services
type: library

version: 0.0.5
version: 0.0.6
appVersion: "1.0.1a23"
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ spec:
- name: {{ $fullName }}
containerPort: {{ .Values.servicePort }}
protocol: TCP
{{- if .Values.configSecret }}
{{- if .Values.configSecret || .Values.volumeMounts }}
volumeMounts:
{{- if .Values.configSecret }}
- mountPath: /config/neon
name: config
{{- if .Values.volumeMounts }}
{{- toYaml $.Values.volumeMounts | nindent 12 -}}
{{- if .Values.resources }}
resources:
{{- toYaml $.Values.resources | nindent 12 -}}
Expand All @@ -42,6 +45,9 @@ spec:
sources:
- secret:
name: {{ .Values.configSecret }}
{{- if .Values.volumes}}
{{- toYaml $.Values.volumes | nindent 8 -}}
{{- end }}
{{- end }}
restartPolicy: Always
{{- end -}}
23 changes: 23 additions & 0 deletions neon_diana_utils/helm_charts/http/stt-fasterwhisper/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions neon_diana_utils/helm_charts/http/stt-fasterwhisper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: stt-fasterwhisper
description: Deploy a FasterWhisper STT Server

type: application
version: 0.0.1
appVersion: "1.0.1a23"

dependencies:
- name: base-http
version: 0.0.6
repository: file://../../base/base-http
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- define "fasterwhisper_config.configmap"}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.core.configMap . }}
data:
"mycroft.conf": |
mikejgray marked this conversation as resolved.
Show resolved Hide resolved
{{ tpl .Values.core.fasterwhisperConfig . | nindent 4}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "stt-fasterwhisper.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "stt-fasterwhisper.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "stt-fasterwhisper.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "stt-fasterwhisper.labels" -}}
helm.sh/chart: {{ include "stt-fasterwhisper.chart" . }}
{{ include "stt-fasterwhisper.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "stt-fasterwhisper.selectorLabels" -}}
app.kubernetes.io/name: {{ include "stt-fasterwhisper.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "stt-fasterwhisper.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "stt-fasterwhisper.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "base-http.deployment" .}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "base-http.ingress" .}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "base-http.service" .}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "stt-fasterwhisper.fullname" . }}-test-connection"
labels:
{{- include "stt-fasterwhisper.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "stt-fasterwhisper.fullname" . }}:{{ .Values.service.targetPort }}']
restartPolicy: Never
63 changes: 63 additions & 0 deletions neon_diana_utils/helm_charts/http/stt-fasterwhisper/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Default values for tts-coqui.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

serviceName: backend-fasterwhisper
replicaCount: 1
subdomain: fasterwhisper
domain: diana.local
servicePort: "8080"

image:
repository: docker.io/smartgic/ovos-stt-server-fasterwhisper
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: alpha
volumeMounts:
- name: config-volume
mountPath: "/home/ovos/.config/mycroft" # Adjusted for the 'ovos' user
readOnly: false
volumes:
- name: config-volume
configMap:
name: mycroft-config
items:
- key: mycroft.conf
path: mycroft.conf
mikejgray marked this conversation as resolved.
Show resolved Hide resolved
resources:
requests:
memory: "4Gi"
cpu: "2.0"

service:
type: NodePort
targetPort: "8080"

ingress:
enabled: true
className: nginx
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- paths:
- path: /
pathType: Prefix
backend:
service:
tls:
secretName: tls-letsencrypt-prod

core:
fasterwhisperConfig: |-
{
"stt": {
"module": "ovos-stt-plugin-fasterwhisper",
"ovos-stt-plugin-fasterwhisper": {
"model": "medium",
"cpu_threads": 4,
"gradio": true
}
}
}
6 changes: 3 additions & 3 deletions neon_diana_utils/templates/backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: backend-deployment
description: A Helm chart to deploy the Neon Diana backend

type: application
version: 1.0.0
version: 1.1.0
appVersion: "1.0.1a5"

dependencies:
- name: backend
version: 0.1.25
repository: https://neongeckocom.github.io/neon-diana-utils
version: 0.1.26
repository: https://neongeckocom.github.io/neon-diana-utils
Loading