46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{
|
|
description = "Audio transcription with faster-whisper (local models only)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
pythonEnv = pkgs.python313.withPackages (ps: with ps; [
|
|
pip
|
|
]);
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
pythonEnv
|
|
uv
|
|
ffmpeg
|
|
zlib
|
|
stdenv.cc.cc.lib
|
|
];
|
|
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
|
|
pkgs.zlib
|
|
pkgs.stdenv.cc.cc.lib
|
|
pkgs.ffmpeg
|
|
]}:$LD_LIBRARY_PATH"
|
|
|
|
# Ensure venv exists
|
|
if [ ! -d .venv ]; then
|
|
uv venv
|
|
fi
|
|
|
|
echo "Transcription environment ready."
|
|
echo "Run: uv run python transcribe.py /path/to/recordings"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|