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

Add auto to model/beam size to whisper #3859

Merged
Merged
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: 4 additions & 0 deletions whisper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.4.0

- Add "auto" for model and beam size (0) to select values based on CPU

## 2.3.1

- Move `turbo` down the list closer to `large` to avoid confusion
Expand Down
4 changes: 3 additions & 1 deletion whisper/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ If you select "auto", the model will run **much** slower but will auto-detect th

Whisper model that will be used for transcription. Choose `custom` to use the model name in `custom_model`, which may be a HuggingFace model ID like "Systran/faster-distil-whisper-small.en".

The default model is `tiny-int8`, a compressed version of the smallest Whisper model which is able to run on a Raspberry Pi 4.
The default model is `auto`, which selects `tiny-int8` for ARM devices like the Raspberry Pi 4 and `base-int8` otherwise.
Compressed models (`int8`) are slightly less accurate than their counterparts, but smaller and faster. [Distilled](https://github.com/huggingface/distil-whisper) models are not compressed, but are faster and smaller than their non-distilled counterparts.

Available models:

- `auto` (select based on CPU)
- `tiny-int8` (compressed)
- `tiny`
- `tiny.en` (English only)
Expand Down Expand Up @@ -70,6 +71,7 @@ Path to a converted model directory, or a CTranslate2-converted Whisper model ID
### Option: `beam_size`

Number of candidates to consider simultaneously during transcription (see [beam search](https://en.wikipedia.org/wiki/Beam_search)).
The default value of `0` will automatically select `1` of ARM devices like the Raspberry Pi 4 and `5` otherwise.

Increasing the beam size will increase accuracy at the cost of performance.

Expand Down
2 changes: 1 addition & 1 deletion whisper/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io
args:
WYOMING_WHISPER_VERSION: 2.3.0
WYOMING_WHISPER_VERSION: 2.4.0
8 changes: 4 additions & 4 deletions whisper/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 2.3.1
version: 2.4.0
slug: whisper
name: Whisper
description: Speech-to-text with Whisper
Expand All @@ -13,13 +13,13 @@ discovery:
backup_exclude:
- "models*"
options:
model: tiny-int8
model: auto
language: en
beam_size: 1
beam_size: 0
debug_logging: false
schema:
model: |
list(tiny-int8|tiny|tiny.en|base-int8|base|base.en|small-int8|distil-small.en|small|small.en|distil-medium.en|medium-int8|medium|medium.en|large|large-v1|distil-large-v2|large-v2|distil-large-v3|large-v3|turbo|custom)
list(auto|tiny-int8|tiny|tiny.en|base-int8|base|base.en|small-int8|distil-small.en|small|small.en|distil-medium.en|medium-int8|medium|medium.en|large|large-v1|distil-large-v2|large-v2|distil-large-v3|large-v3|turbo|custom)
custom_model: str?
language: |
list(auto|af|am|ar|as|az|ba|be|bg|bn|bo|br|bs|ca|cs|cy|da|de|el|en|es|et|eu|fa|fi|fo|fr|gl|gu|ha|haw|he|hi|hr|ht|hu|hy|id|is|it|ja|jw|ka|kk|km|kn|ko|la|lb|ln|lo|lt|lv|mg|mi|mk|ml|mn|mr|ms|mt|my|ne|nl|nn|no|oc|pa|pl|ps|pt|ro|ru|sa|sd|si|sk|sl|sn|so|sq|sr|su|sv|sw|ta|te|tg|th|tk|tl|tr|tt|uk|ur|uz|vi|yi|yo|zh|yue)
Expand Down
Loading