void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.5k stars 2.11k forks source link

Package request: sprec #51716

Open Anachron opened 1 month ago

Anachron commented 1 month ago

Package name

sprec

Package homepage

https://git.sr.ht/~geb/sprec

Description

sprec is a simple speech recognition command that can be used for transcription or automation.

It uses the Vosk speech recognition toolkit, which is FOSS and offline.

Does the requested package meet the package requirements?

System, Compiled

Is the requested package released?

Yes

Anachron commented 1 month ago

Template:

# Template file for 'sprec'
pkgname=sprec
version=0.1
revision=1
build_style=go
go_import_path="git.sr.ht/~geb/sprec"
hostmakedepends="scdoc"
makedepends="vosk-api libgomp-devel"
short_desc="Simple speech recognition command for transcription or automation using vosk-api"
maintainer="Anachron <gith@cron.world>"
license="GPL-3.0-or-later"
homepage="https://git.sr.ht/~geb/sprec"
distfiles="https://git.sr.ht/~geb/sprec/archive/${version}.tar.gz"
checksum=085b7e0bd54ce79d7bb9b1f26cb72c6099264763a1b2c0743f15401b523aaae9

if [ "$XBPS_TARGET_LIBC" = musl ]; then
    makedepends+=" libexecinfo-devel"
fi

pre_build() {
    # for the vosk-api package (openblas)
    export CGO_LDFLAGS="$CGO_LDFLAGS -fopenmp"

    if [ "$XBPS_TARGET_LIBC" = musl ]; then
        # for the vosk-api package (openfst)
        export CGO_LDFLAGS="$CGO_LDFLAGS -lexecinfo"
    fi
}

post_build() {
    scdoc < doc/sprec.1.scd > sprec.1
    vman sprec.1
}