2024-10-18 19:35:08 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
self,
|
|
|
|
...
|
|
|
|
}: let
|
2024-09-04 17:43:46 -04:00
|
|
|
tailscaleIP = "100.64.0.4";
|
|
|
|
in {
|
|
|
|
imports = [self.nixosModules.wyoming-plus];
|
|
|
|
|
2024-09-05 10:27:54 -04:00
|
|
|
# In case tailscale is down
|
|
|
|
boot.kernel.sysctl."net.ipv4.ip_nonlocal_bind" = 1;
|
|
|
|
|
2024-09-04 17:43:46 -04:00
|
|
|
services = {
|
|
|
|
# Speech-to-Text
|
2024-10-18 19:35:08 -04:00
|
|
|
wyoming.faster-whisper = {
|
|
|
|
# FIXME: wyoming-faster-whisper requires av < 13.0.0. make issue in nixpkgs?
|
|
|
|
package = pkgs.wyoming-faster-whisper.override {
|
|
|
|
python3Packages =
|
|
|
|
(pkgs.python3.override {
|
|
|
|
packageOverrides = pyfinal: pyprev: {
|
|
|
|
av =
|
|
|
|
(pyprev.av.override {
|
|
|
|
ffmpeg-headless = pkgs.ffmpeg_6-headless;
|
|
|
|
})
|
|
|
|
.overridePythonAttrs (o: rec {
|
|
|
|
version = "12.3.0";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "PyAV-Org";
|
|
|
|
repo = "PyAV";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-ezeYv55UzNnnYDjrMz5YS5g2pV6U/Fxx3e2bCoPP3eI=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
})
|
|
|
|
.pkgs;
|
|
|
|
};
|
|
|
|
|
|
|
|
servers."en" = {
|
|
|
|
enable = true;
|
|
|
|
uri = "tcp://${tailscaleIP}:10300";
|
2024-09-04 17:43:46 -04:00
|
|
|
|
2024-10-18 19:35:08 -04:00
|
|
|
# see https://github.com/rhasspy/wyoming-faster-whisper/releases/tag/v2.0.0
|
|
|
|
model = "medium";
|
|
|
|
language = "en";
|
|
|
|
device = "cuda";
|
|
|
|
};
|
2024-09-04 17:43:46 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
# Text-to-Intent
|
|
|
|
ollama = {
|
|
|
|
enable = true;
|
|
|
|
acceleration = "cuda";
|
|
|
|
|
|
|
|
host = tailscaleIP;
|
|
|
|
port = 11434;
|
|
|
|
|
2024-09-11 13:07:51 -04:00
|
|
|
loadModels = ["mistral-nemo"];
|
2024-09-06 10:13:47 -04:00
|
|
|
environmentVariables.OLLAMA_DEBUG = "1";
|
2024-09-04 17:43:46 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|