mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
wyoming-faster-whisper: 3.5.0 -> 3.6.0
https://github.com/OHF-Voice/wyoming-faster-whisper/releases/tag/v3.6.0
This commit is contained in:
@@ -10,6 +10,8 @@ let
|
||||
cfg = config.services.wyoming.faster-whisper;
|
||||
|
||||
inherit (lib)
|
||||
any
|
||||
hasInfix
|
||||
mapAttrsToList
|
||||
mkOption
|
||||
mkEnableOption
|
||||
@@ -69,6 +71,7 @@ in
|
||||
"auto"
|
||||
"faster-whisper"
|
||||
"onnx-asr"
|
||||
"qwen3-asr"
|
||||
"sherpa"
|
||||
"transformers"
|
||||
];
|
||||
@@ -311,8 +314,13 @@ in
|
||||
in
|
||||
mkIf (cfg.servers != { }) {
|
||||
assertions = mapAttrsToList (server: options: {
|
||||
assertion = options.sttLibrary != "faster-whisper" -> options.initialPrompt == null;
|
||||
message = "wyoming-faster-whisper/${server}: Initial prompt is only supported when using `faster-whisper` as `sttLibrary`.";
|
||||
assertion =
|
||||
!lib.elem options.sttLibrary [
|
||||
"faster-whisper"
|
||||
"qwen3-asr"
|
||||
]
|
||||
-> options.initialPrompt == null;
|
||||
message = "wyoming-faster-whisper/${server}: Initial prompt is only supported when `sttLibrary` is `faster-whisper` or `qwen3-asr`.";
|
||||
}) cfg.servers;
|
||||
|
||||
systemd.services = mapAttrs' (
|
||||
@@ -321,6 +329,7 @@ in
|
||||
finalPackage = cfg.package.overridePythonAttrs (oldAttrs: {
|
||||
dependencies =
|
||||
oldAttrs.dependencies
|
||||
++ optionals (any (arg: hasInfix "--hass" arg) cfg.extraArgs) oldAttrs.optional-dependencies.hass
|
||||
++ optionals options.zeroconf.enable oldAttrs.optional-dependencies.zeroconf
|
||||
++ optionals (
|
||||
options.sttLibrary == "onnx-asr" || options.sttLibrary == "auto" && options.language == "ru"
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "wyoming-faster-whisper";
|
||||
version = "3.5.0";
|
||||
version = "3.6.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OHF-Voice";
|
||||
repo = "wyoming-faster-whisper";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-+RmP552zsvWbxIpfhmKNdU4EZSeEImUdaF827g6Tuco=";
|
||||
hash = "sha256-E1B9Z0gcT5EnRFpfkPGV+c8uHwrpFYf9YqdZjgsnjNE=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
@@ -44,6 +44,11 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
]
|
||||
++ onnx-asr.optional-dependencies.cpu
|
||||
++ onnx-asr.optional-dependencies.hub;
|
||||
qwen3_asr = [
|
||||
onnxruntime
|
||||
tokenizers
|
||||
];
|
||||
hass = [ aiohttp ];
|
||||
zeroconf = [
|
||||
wyoming
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user