Documentation
¶
Overview ¶
Package testenv says where the integration tests find their data: libspeech, the models and the audio that cmd/speech-testdata builds under the module's .cache directory, or what SPEECH_CPP_LIB, SPEECH_CPP_MODELS and SPEECH_CPP_AUDIO name instead. SPEECH_CPP_USER_AGENT, when set, is the User-Agent of the tests that reach the network. SPEECH_CPP_REQUIRE_ALL, when true, makes a missing optional model fail its test instead of skipping it.
Index ¶
Constants ¶
const ( EnvLib = "SPEECH_CPP_LIB" EnvModels = "SPEECH_CPP_MODELS" EnvAudio = "SPEECH_CPP_AUDIO" EnvUserAgent = "SPEECH_CPP_USER_AGENT" // EnvRequireAll is read by RequireAll. EnvRequireAll = "SPEECH_CPP_REQUIRE_ALL" )
The environment variables the integration tests read.
Variables ¶
This section is empty.
Functions ¶
func HostTarget ¶
HostTarget is the running platform with the backend of the build speech.cpp publishes for its OS: Metal on macOS, CPU on Linux, Vulkan on Windows. Its Platform method fails on a platform with no published build.
func LibPath ¶
LibPath is SPEECH_CPP_LIB, or the host target's library installed under <moduleRoot>/.cache/lib/<platform>.
func RequireAll ¶
func RequireAll() bool
RequireAll reports whether SPEECH_CPP_REQUIRE_ALL is set to a true value (strconv.ParseBool: 1, t, true, ...): a missing optional model then fails its test instead of skipping it. Unset, empty or unparsable means false.
Types ¶
This section is empty.