mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 09:57:57 -04:00
C++/ggml transcription + speaker diarization + timestamps backend. Purego dlopens libmoss-transcribe.so (ggml statically linked) from moss-transcribe.cpp and serves offline AudioTranscription, parsing the [start][Sxx]text[end] output into segments with nanosecond timestamps. Adds the importer (surfaces in GET /backends/known), backend-matrix (Linux + Darwin/metal), backend/index.yaml, and a gallery entry (default q5_k GGUF from mudler/moss-transcribe.cpp-gguf). Local L0 smoke (go build + go test ./... = 16 pass, golangci-lint 0 issues) passed against the real libmoss-transcribe.so. The pre-commit coverage gate (full pkg/core + tests/e2e) could not run in the authoring sandbox (no live models, port 9090 held); CI must enforce it before merge. Assisted-by: Claude:claude-opus-4-8 golangci-lint Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
23 lines
760 B
Bash
Executable File
23 lines
760 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
CURDIR=$(dirname "$(realpath "$0")")
|
|
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
export DYLD_LIBRARY_PATH="$CURDIR/lib:"$CURDIR":${DYLD_LIBRARY_PATH:-}"
|
|
export MOSS_TRANSCRIBE_LIBRARY="$CURDIR/lib/libmoss-transcribe.dylib"
|
|
else
|
|
export LD_LIBRARY_PATH="$CURDIR/lib:"$CURDIR":${LD_LIBRARY_PATH:-}"
|
|
export MOSS_TRANSCRIBE_LIBRARY="$CURDIR/lib/libmoss-transcribe.so"
|
|
fi
|
|
|
|
# If a self-contained ld.so was packaged, route through it so the packaged libc
|
|
# / libstdc++ are used instead of the host's (matches the whisper / parakeet-cpp
|
|
# backends' runtime layout). Linux only.
|
|
if [ -f "$CURDIR/lib/ld.so" ]; then
|
|
echo "Using lib/ld.so"
|
|
exec "$CURDIR/lib/ld.so" "$CURDIR/moss-transcribe-cpp-grpc" "$@"
|
|
fi
|
|
|
|
exec "$CURDIR/moss-transcribe-cpp-grpc" "$@"
|