Merge pull request #263596 from mweinelt/wyoming-faster-whisper-fix-model-download

wyoming-faster-whisper: fix model download with python3.11+
This commit is contained in:
Martin Weinelt 2023-10-26 16:39:40 +02:00 committed by GitHub
commit d21921b6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -37,6 +37,9 @@ in
enable = mkEnableOption (mdDoc "Wyoming faster-whisper server");
model = mkOption {
# Intersection between available and referenced models here:
# https://github.com/rhasspy/models/releases/tag/v1.0
# https://github.com/rhasspy/rhasspy3/blob/wyoming-v1/programs/asr/faster-whisper/server/wyoming_faster_whisper/download.py#L17-L27
type = enum [
"tiny"
"tiny-int8"
@ -44,7 +47,6 @@ in
"base-int8"
"small"
"small-int8"
"medium"
"medium-int8"
];
default = "tiny-int8";

View File

@ -1,6 +1,7 @@
{ lib
, python3
, fetchPypi
, fetchpatch
}:
python3.pkgs.buildPythonApplication rec {
@ -16,6 +17,13 @@ python3.pkgs.buildPythonApplication rec {
patches = [
./faster-whisper-entrypoint.patch
# fix model retrieval on python3.11+
(fetchpatch {
url = "https://github.com/rhasspy/rhasspy3/commit/ea55a309e55384e6fd8c9f19534622968f8ed95b.patch";
hash = "sha256-V9WXKE3+34KGubBS23vELTHjqU2RCTk3sX8GTjmH+AA=";
stripLen = 4;
})
];
propagatedBuildInputs = with python3.pkgs; [