feat(wyoming-whisper): Update whisper config (#20623)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
This updates the chart to match config options modified upstream in
https://github.com/home-assistant/addons/pull/3507

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->
Tests in my own repo for this particular chart were succesful.

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Aleksandr Oleinikov <10602045+tannisroot@users.noreply.github.com>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Aleksandr Oleinikov
2024-04-14 00:18:55 +00:00
committed by GitHub
co-authored by Stavros Kois
parent 37d2fb846d
commit 4c70a569e4
5 changed files with 88 additions and 28 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/wyoming-whisper
- https://hub.docker.com/r/rhasspy/wyoming-whisper
type: application
version: 5.1.4
version: 5.2.0
+53 -12
View File
@@ -222,6 +222,8 @@ questions:
description: yi
- value: yo
description: yo
- value: yue
description: yue
- value: zh
description: zh
- variable: model
@@ -232,20 +234,53 @@ questions:
required: true
default: tiny-int8
enum:
- value: base
description: base
- value: base-int8
description: base-int8
- value: medium-int8
description: medium-int8
- value: small
description: small
- value: small-int8
description: small-int8
- value: tiny
description: tiny
- value: custom
description: custom
- value: tiny-int8
description: tiny-int8
- value: tiny
description: tiny
- value: tiny.en
description: tiny.en
- value: base-int8
description: base-int8
- value: base
description: base
- value: base.en
description: base.en
- value: small-int8
description: small-int8
- value: distil-small.en
description: distil-small.en
- value: small
description: small
- value: small.en
description: small.en
- value: medium-int8
description: medium-int8
- value: distil-medium.en
description: distil-medium.en
- value: medium
description: medium
- value: medium.en
description: medium.en
- value: large
description: large
- value: large-v1
description: large-v1
- value: distil-large-v2
description: distil-large-v2
- value: large-v2
description: large-v2
- value: large-v3
description: large-v3
- variable: custom_model
label: Custom Model
description: 'Path to a converted model directory, or a CTranslate2-converted Whisper model ID from the HuggingFace Hub like "Systran/faster-distil-whisper-small.en".'
schema:
type: string
default: ""
show_if: [[model, "=", "custom"]]
- variable: beam_size
label: Beam Size
description: Number of candidates to consider simultaneously during transcription.
@@ -253,6 +288,12 @@ questions:
type: int
required: true
default: 1
- variable: initial_prompt
label: Initial prompt
description: Description of audio that can help Whisper transcribe unusual words better.
schema:
type: string
default: ""
# Include{containerConfig}
# Include{serviceRoot}
# Include{serviceMain}
@@ -0,0 +1,12 @@
{{- define "wyoming-whisper.args" -}}
{{- $whisper := .Values.wyoming_whisper -}}
args:
- --language
- {{ $whisper.language | quote }}
- --model
- {{ ternary $whisper.custom_model $whisper.model (eq $whisper.model "custom") | quote }}
- --beam-size
- {{ $whisper.beam_size | quote }}
- --initial-prompt
- {{ $whisper.initial_prompt | quote }}
{{- end -}}
@@ -1 +1,8 @@
{{ include "tc.v1.common.loader.all" . }}
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}
{{- $newArgs := (include "wyoming-whisper.args" . | fromYaml) }}
{{- $_ := set .Values.workload.main.podSpec.containers.main "args" $newArgs.args -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}
+14 -14
View File
@@ -2,10 +2,22 @@ image:
repository: rhasspy/wyoming-whisper
pullPolicy: IfNotPresent
tag: 2.1.0@sha256:ceaa162ec05e53b8fa883182cdbceb72e6a1422740ec35be038c9faa278323b3
service:
main:
ports:
main:
port: 10300
protocol: tcp
targetPort: 10300
wyoming_whisper:
language: en
model: tiny-int8
# custom_model: ""
beam_size: 1
initial_prompt: ""
workload:
main:
podSpec:
@@ -21,20 +33,7 @@ workload:
startup:
port: 10300
type: tcp
args:
- --language
- "{{ .Values.wyoming_whisper.language }}"
- --model
- "{{ .Values.wyoming_whisper.model }}"
- --beam-size
- "{{ .Values.wyoming_whisper.beam_size }}"
service:
main:
ports:
main:
port: 10300
protocol: tcp
targetPort: 10300
persistence:
config:
enabled: true
@@ -42,6 +41,7 @@ persistence:
cache:
enabled: true
mountPath: /.cache/huggingface/hub
portal:
open:
enabled: false